Return the resource tracker that is tracking ``resource``.

        :param resource: A resource.
        :return: A resource tracker.
        :rtype: :class:`_ResourceTracker`
773021
def _get_tracker(self, resource):
        
        with self._lock:
            for rt in self._reference_queue:
                if rt is not None and resource is rt.resource:
                    return rt

        raise UnknownResourceError('Resource not created by pool')
156578
def resource(self):
        
        if self._resource:
            return self._resource
        elif self.binding:
            return self.binding.resource
248590
def parent(self, resource):
        
        resource.check()
        self['parent_type'] = resource.type
        self['parent_uuid'] = resource.uuid
113308
def tracked(self):
        ''''''
        results = json.loads(self.client('track'))
        results['jobs'] = [Job(self, **job) for job in results['jobs']]
        return results
800853
def get_consistent_resource(self):
        
        http_client = HttpClient()
        response, _ = http_client.get(routes.url(routes.PAYMENT_RESOURCE, resource_id=self.id))
        return Payment(**response)
895481
def get_resource(self, type: Type[T_Resource], name: str = 'default') -> Optional[T_Resource]:
        
        assert check_argument_types()
        self._check_closed()
        key = (type, name)

        # First check if there's already a matching resource in this context
        resource = self._resources.get(key)
        if resource is not None:
            return resource.value_or_factory

        # Next, check if there's a resource factory available on the context chain
        resource = next((ctx._resource_factories[key] for ctx in self.context_chain
                         if key in ctx._resource_factories), None)
        if resource is not None:
            return resource.generate_value(self)

        # Finally, check parents for a matching resource
        return next((ctx._resources[key].value_or_factory for ctx in self.context_chain
                     if key in ctx._resources), None)
1080595
def get_resource_url(resource):
    
    path = model_path(resource)
    parsed = list(urlparse.urlparse(path))
    parsed[1] = ""
    return urlparse.urlunparse(parsed)
610799
def get_tracking_id(self):
        
        self.assert_open()
        tracking = self.handle[self.global_key +'tracking_id'].attrs.items()
        tracking = {key: _clean(value) for key, value in tracking}
        return tracking
46608
def Get_Page(self):
		'''
			
		'''
		url = 'http://www.gati.com/webservices/gatiicedkttrack.jsp?dktno=' + self.tracking_no
		response = requests.get(url)

		self.page = response.text
632973
def inspect_resources(self):
        
        if not self._inspect_resources:
            d = {}
            for m in self.inspect_members:
                if issubclass(m, (AWSObject, cloudformation.AWSCustomObject)) \
                        and hasattr(m, 'resource_type'):
                    d[m.resource_type] = m

            TemplateGenerator._inspect_resources = d

        return self._inspect_resources
632707
def get_resource(resource_name):
    

    resource_path = None
    if hasattr(sys, "frozen"):
        resource_path = os.path.normpath(os.path.join(os.path.dirname(sys.executable), resource_name))
    elif not hasattr(sys, "frozen") and pkg_resources.resource_exists("gns3server", resource_name):
        resource_path = pkg_resources.resource_filename("gns3server", resource_name)
        resource_path = os.path.normpath(resource_path)
    return resource_path
276423
def full_tasktrace(self):
        
        if self.prev_error:
            return self.prev_error.tasktrace + self.tasktrace
        else:
            return self.tasktrace
566722
def in_resource(self, field, resource):
        
        resource_field = resource.get(field, None)
        return resource_field is not None and resource_field != ''
123430
def notify(self, resource):
        
        observers = self._observeLayer.notify(resource)
        logger.debug("Notify")
        for transaction in observers:
            with transaction:
                transaction.response = None
                transaction = self._requestLayer.receive_request(transaction)
                transaction = self._observeLayer.send_response(transaction)
                transaction = self._blockLayer.send_response(transaction)
                transaction = self._messageLayer.send_response(transaction)
                if transaction.response is not None:
                    if transaction.response.type == defines.Types["CON"]:
                        self._start_retransmission(transaction, transaction.response)

                    self.send_datagram(transaction.response)
322980
def get_delete_api(self, resource):
        

        parameters = self.delete_item_parameters(resource)

        get_item_api = {
            'path': '/%s/{id}/' % resource.get_api_name(),
            'description': 'Operations on %s' % resource.model.__name__,
            "responseClass": "void",
            'operations': [
                {
                    'httpMethod': 'DELETE',
                    'nickname': 'delete%s' % resource.model.__name__,
                    'summary': 'Delete %s by its unique ID' %
                               resource.model.__name__,
                    'parameters': parameters,
                }
            ]
        }

        return get_item_api
76537
def from_api_repr(cls, resource):
        
        return cls(kind=resource.get("kind"), substeps=resource.get("substeps", ()))
1254364
def get_sources(self, resources):
        

        rtype = self.rtype  # E.g. category
        label = self.props.label  # E.g. category1
        result = [
            resource
            for resource in resources.values()
            if is_reference_target(resource, rtype, label)
        ]
        return result