code: def _concrete_instance(self, instance_doc):
          
          if not isinstance(instance_doc, dict):
              return None
  
          # Attempt to instantiate the appropriate class for the given instance document.
          try:
              service = instance_doc['service']
              cls = self._service_class_map[service]
              return cls(instance_document=instance_doc, instances=self)
  
          # If construction fails, log the exception and return None.
          except Exception as ex:
              logger.exception(ex)
              logger.error(
                  'Instance construction failed. You probably need to upgrade to a more '
                  'recent version of the client. Instance document which generated this '
                  'warning: {}'.format(instance_doc)
              )
              return None
docs: Concretize an instance document.
  
          :param dict instance_doc: A document describing an instance. Should come from the API.
          :returns: A subclass of :py:class:`bases.BaseInstance`, or None.
          :rtype: :py:class:`bases.BaseInstance`