code: def from_pb(cls, policy_pb):
          
          policy = cls(policy_pb.etag, policy_pb.version)
  
          for binding in policy_pb.bindings:
              policy[binding.role] = sorted(binding.members)
  
          return policy
docs: Factory: create a policy from a protobuf message.
  
          Args:
              policy_pb (google.iam.policy_pb2.Policy): message returned by
              ``get_iam_policy`` gRPC API.
  
          Returns:
              :class:`Policy`: the parsed policy