code: def get_collection(self, **kwargs):
          
          list_of_contents = []
          self.refresh(**kwargs)
          if 'items' in self.__dict__:
              for item in self.items:
                  # It's possible to have non-"kind" JSON returned. We just
                  # append the corresponding dict. PostProcessing is the caller's
                  # responsibility.
                  if 'kind' not in item:
                      list_of_contents.append(item)
                      continue
                  kind = item['kind']
                  if kind in self._meta_data['attribute_registry']:
                      # If it has a kind, it must be registered.
                      instance = self._meta_data['attribute_registry'][kind](self)
                      instance._local_update(item)
                      instance._activate_URI(instance.selfLink)
                      list_of_contents.append(instance)
                  else:
                      error_message = '%r is not registered!' % kind
                      raise UnregisteredKind(error_message)
          return list_of_contents
docs: Get an iterator of Python ``Resource`` objects that represent URIs.
  
          The returned objects are Pythonic `Resource`s that map to the most
          recently `refreshed` state of uris-resources published by the device.
          In order to instantiate the correct types, the concrete subclass must
          populate its registry with acceptable types, based on the `kind` field
          returned by the REST server.
  
          .. note::
              This method implies a single REST transaction with the
              Collection subclass URI.
  
          :raises: UnregisteredKind
          :returns: list of reference dicts and Python ``Resource`` objects