code: def _create_resource_from_dict(self, resource, dict):
          
          if isinstance(resource, CollectionResource):
              return self._get_collection(dict)
  
          if isinstance(resource, ExperimentResource):
              return self._get_experiment(dict, resource.coll_name)
  
          if isinstance(resource, CoordinateFrameResource):
              return self._get_coordinate(dict)
  
          if isinstance(resource, ChannelResource):
              return self._get_channel(dict, resource.coll_name, resource.exp_name)
  
          raise TypeError('resource is not supported type.')
docs: Args:
              resource (intern.resource.boss.BossResource): Used to determine type of resource to create.
              dict (dictionary): JSON data returned by the Boss API.
  
          Returns:
              (intern.resource.boss.BossResource): Instance populated with values from dict.
  
          Raises:
              KeyError if dict missing required key.
              TypeError if resource is not a supported class.