code: def _deserialize(
      blob: Any,
      from_proto: bool = True,
      from_bytes: bool = False,
  ) -> Any:
      # relative
      from .recursive import rs_bytes2object
      from .recursive import rs_proto2object
  
      if (
          (from_bytes and not isinstance(blob, bytes))
          or (
              from_proto
              and not from_bytes
              and not isinstance(blob, _DynamicStructBuilder)
          )
          or not (from_bytes or from_proto)
      ):
          raise TypeError("Wrong deserialization format.")
  
      if from_bytes:
          return rs_bytes2object(blob)
  
      if from_proto:
          return rs_proto2object(blob)
  
label_desc: Use image node_id 1 for calling a global function with example usage: _deserialize(blob, from_proto, from_bytes) and returns: rs_bytes2object, rs_proto2object