'Static factory method. Returns the Entity representation of the
given protocol buffer (datastore_pb.Entity).
Args:
pb: datastore_pb.Entity or str encoding of a datastore_pb.Entity
validate_reserved_properties: deprecated
default_kind: str, the kind to use if the pb has no key.
Returns:
Entity: the Entity representation of pb'

@staticmethod
def FromPb(pb, validate_reserved_properties=True, default_kind='<not    specified>'):

    if isinstance(pb, str):
        real_pb = entity_pb.EntityProto()
        real_pb.ParsePartialFromString(pb)
        pb = real_pb
    return Entity._FromPb(pb, require_valid_key=False, default_kind=default_kind)
