code: def _serialize(
      obj: object,
      to_proto: bool = True,
      to_bytes: bool = False,
      for_hashing: bool = False,
  ) -> Any:
      # relative
      from .recursive import rs_object2proto
  
      proto = rs_object2proto(obj, for_hashing=for_hashing)
  
      if to_bytes:
          return proto.to_bytes()
  
      if to_proto:
          return proto
  
label_desc: Use image node_id 1 for calling a global function with example usage: _serialize(obj, to_proto, to_bytes, for_hashing) and returns: proto, proto