def METHOD_NAME(self) -> EntityProto:
    """
    Converts an entity object to its protobuf representation.
    Returns:
        An EntityProto protobuf.
    """
    meta = EntityMetaProto()
    if self.created_timestamp:
        meta.created_timestamp.FromDatetime(self.created_timestamp)
    if self.last_updated_timestamp:
        meta.last_updated_timestamp.FromDatetime(self.last_updated_timestamp)
    spec = EntitySpecProto(
        name=self.name,
        value_type=self.value_type.value,
        join_key=self.join_key,
        description=self.description,
        tags=self.tags,
        owner=self.owner,
    )
    return EntityProto(spec=spec, meta=meta)