class_docstr: Abstract base class for handling custom payload serialization and deserialization.
  
  Provides a skeleton for customization requiring the overriding of the
  `serialize_payload` and `deserialize_payload` methods.
  
  Args:
      content_type (str): The content type of the endpoint input data.
      accept_type (str): The content type of the data accepted from the endpoint.
class_docstr_tok: ["Abstract","base","class","for","handling","custom","payload","serialization","and","deserialization",".","Provides","a","skeleton","for","customization","requiring","the","overriding","of","the","`","serialize_payload","`","and","`","deserialize_payload","`","methods",".","Args",":","content_type","(","str",")",":","The","content","type","of","the","endpoint","input","data",".","accept_type","(","str",")",":","The","content","type","of","the","data","accepted","from","the","endpoint","."]
docstr: Serialize payload into bytes
  
  Args:
      payload (object): Data to be serialized into bytes.
  
  Returns:
      bytes: bytes of serialized data
docstr_tok: ["Serialize","payload","into","bytes","Args",":","payload","(","object",")",":","Data","to","be","serialized","into","bytes",".","Returns",":","bytes",":","bytes","of","serialized","data"]
code: def serialize_payload_to_bytes(self, payload: object) -> bytes:
      """Serialize payload into bytes
  
      Args:
          payload (object): Data to be serialized into bytes.
  
      Returns:
          bytes: bytes of serialized data
      """
  
file_path: sagemaker-python-sdk/src/sagemaker/serve/marshalling/custom_payload_translator.py
imports: from __future__ import absolute_import
  import abc
  from typing import IO
label_desc: Use image node_id 2 for calling the CustomPayloadTranslator obj's underlying member method code with example usage: obj.serialize_payload_to_bytes(payload) without return types