Given self.resource, split information from the CTS API

        :return: None
17254
def _parse(self):
        
        self.response = self.resource
        self.resource = self.resource.xpath("//ti:passage/tei:TEI", namespaces=XPATH_NAMESPACES)[0]

        self._prev_id, self._next_id = _SharedMethod.prevnext(self.response)

        if not self.citation.is_set() and len(self.resource.xpath("//ti:citation", namespaces=XPATH_NAMESPACES)):
            self.citation = CtsCollection.XmlCtsCitation.ingest(
                self.response,
                xpath=".//ti:citation[not(ancestor::ti:citation)]"
            )
1082721
def split_metadata_params(headers):
    

    params = {}
    metadata = {}
    for header_name in headers:
        if header_name.lower() in header_mapping:
            params[header_mapping[header_name.lower()]] = headers[header_name]
        else:
            metadata[header_name] = headers[header_name]
    return metadata, params
1036252
def split(self, meta=False):
        
        return [self.substructure(c, meta, False) for c in connected_components(self)]
278002
def read_resource_list(self, uri):
        """"""
        self.logger.info("Reading resource list %s" % (uri))
        try:
            resource_list = ResourceList(allow_multifile=self.allow_multifile,
                                         mapper=self.mapper)
            resource_list.read(uri=uri)
        except Exception as e:
            raise ClientError("Can't read source resource list from %s (%s)" %
                              (uri, str(e)))
        self.logger.debug("Finished reading resource list")
        return(resource_list)
274189
def get_resources(resources):  # pylint:disable=too-many-branches
    
    limits = {}
    requests = {}
    if resources is None:
        return None
    if resources.cpu:
        if resources.cpu.limits:
            limits['cpu'] = resources.cpu.limits
        if resources.cpu.requests:
            requests['cpu'] = resources.cpu.requests

    if resources.memory:
        if resources.memory.limits:
            limits['memory'] = '{}Mi'.format(resources.memory.limits)
        if resources.memory.requests:
            requests['memory'] = '{}Mi'.format(resources.memory.requests)

    if resources.gpu:
        if resources.gpu.limits:
            limits[conf.get('K8S_GPU_RESOURCE_KEY')] = resources.gpu.limits
        if resources.gpu.requests:
            requests[conf.get('K8S_GPU_RESOURCE_KEY')] = resources.gpu.requests

    if resources.tpu:
        if resources.tpu.limits:
            limits[conf.get('K8S_TPU_RESOURCE_KEY')] = resources.tpu.limits
        if resources.tpu.requests:
            requests[conf.get('K8S_TPU_RESOURCE_KEY')] = resources.tpu.requests
    return client.V1ResourceRequirements(limits=limits or None, requests=requests or None)
691928
def from_api_repr(cls, resource):
        
        version = resource.get("version")
        etag = resource.get("etag")
        policy = cls(etag, version)
        for binding in resource.get("bindings", ()):
            role = binding["role"]
            members = sorted(binding["members"])
            policy[role] = members
        return policy
4059
def split_root(self):
        
        if not PY3 and hasattr(self._lib, 'splitunc'):
            root, rest = self._lib.splitunc(self.path)
            if root:
                if rest.startswith(self._sep):
                    root += self._sep
                    rest = rest[1:]
                return self.__class__(root), self.__class__(rest)
        root, rest = self._lib.splitdrive(self.path)
        if root:
            if rest.startswith(self._sep):
                root += self._sep
                rest = rest[1:]
            return self.__class__(root), self.__class__(rest)
        if self.path.startswith(self._sep):
            return self.__class__(self._sep), self.__class__(rest[1:])
        return self.__class__(''), self
1285022
def traverse(path, request, resource):
    

    path = path.lstrip(b"/")
    for component in path and path.split(b"/"):
        if getattr(resource, "is_leaf", False):
            break
        resource = resource.get_child(name=component, request=request)
    return resource
93379
def _from_metadata(self, urlpath):
        """"""
        md = self.get_metadata(urlpath)
        if md is not None:
            return [e['cache_path'] for e in md]
1355927
def _split_repo_str(repo):
    '''
    
    '''
    split = sourceslist.SourceEntry(repo)
    return split.type, split.architectures, split.uri, split.dist, split.comps
420520
def filter_resource(self, resource_name, field_name, field_value,
                        result_handler=ONE_RESULT):
        
        return self.multi_filter_resource(resource_name,
                                          {field_name: field_value},
                                          result_handler=result_handler)
11789
def split(self):
        
        try:
            first, second = self.uri.rsplit('/', 1)
        except ValueError:
            first = ''
            second = self.uri
        # we might be already on the root
        if first.endswith('//'):
            first = first + '/'
        if not first:
            first = '.'
        return (self.__class__(
            first,
            sep=self.sep,
            **self._extras()
            ),
            second.partition('?')[0]
            )
1210631
def split_comp_info(self, catalog_name, split_ver, split_key):
        
        return self._split_comp_info_dicts["%s_%s" % (catalog_name, split_ver)][split_key]
1286664
def _build_resource(self):
        """"""
        resource = {"name": self.name}

        if self.dns_name is not None:
            resource["dnsName"] = self.dns_name

        if self.description is not None:
            resource["description"] = self.description

        if self.name_server_set is not None:
            resource["nameServerSet"] = self.name_server_set

        return resource
7967
def _parse_raw(self, raw):
        
        self.raw = raw
        if not raw:
            raise NotImplementedError("We cannot instantiate empty resources: %s" % raw)
        dict2resource(raw, self, self._options, self._session)
914397
def sanitize_resources(resource: dict):
        
        try:
            for shade in resource[ATTR_SHADE_DATA]:
                _name = shade.get(ATTR_NAME)
                if _name:
                    shade[ATTR_NAME_UNICODE] = base64_to_unicode(_name)
            return resource
        except (KeyError, TypeError):
            LOGGER.debug("no shade data available")
            return None
654155
def resource_md5(self, resource):
        """"""
        if not(resource in self.contents['md5']):
            raise ValueError("No such resource %r in refpkg" % (resource,))
        return self.contents['md5'][resource]