code: def from_api_repr(cls, resource, bucket):
          
          instance = cls(bucket)
          instance.update(resource)
          return instance
docs: Factory:  construct instance from resource.
  
          :type bucket: :class:`Bucket`
          :params bucket: Bucket for which this instance is the policy.
  
          :type resource: dict
          :param resource: mapping as returned from API call.
  
          :rtype: :class:`IAMConfiguration`
          :returns: Instance created from resource.