class_docstr: Class representing a remote function stored in S3.
docstr: Serialize and persist the function and arguments.
  
  Args:
      func: the python function.
      args: the positional arguments to func.
      kwargs: the keyword arguments to func.
  Returns:
      None
docstr_tok: ["Serialize","and","persist","the","function","and","arguments",".","Args",":","func",":","the","python","function",".","args",":","the","positional","arguments","to","func",".","kwargs",":","the","keyword","arguments","to","func",".","Returns",":","None"]
code: def save(self, func, *args, **kwargs):
      """Serialize and persist the function and arguments.
  
      Args:
          func: the python function.
          args: the positional arguments to func.
          kwargs: the keyword arguments to func.
      Returns:
          None
      """
  
      logger.info(
          "Serializing function code to %s",
          s3_path_join(self.func_upload_path, FUNCTION_FOLDER),
      )
      serialization.serialize_func_to_s3(
          func=func,
          sagemaker_session=self.sagemaker_session,
          s3_uri=s3_path_join(self.func_upload_path, FUNCTION_FOLDER),
          s3_kms_key=self.s3_kms_key,
          hmac_key=self.hmac_key,
      )
  
      logger.info(
          "Serializing function arguments to %s",
          s3_path_join(self.func_upload_path, ARGUMENTS_FOLDER),
      )
  
      serialization.serialize_obj_to_s3(
          obj=(args, kwargs),
          sagemaker_session=self.sagemaker_session,
          s3_uri=s3_path_join(self.func_upload_path, ARGUMENTS_FOLDER),
          hmac_key=self.hmac_key,
          s3_kms_key=self.s3_kms_key,
      )
  
file_path: sagemaker-python-sdk/src/sagemaker/remote_function/core/stored_function.py
imports: from __future__ import absolute_import
  import os
  from dataclasses import dataclass
  from typing import Any
  from sagemaker.s3 import s3_path_join
  from sagemaker.remote_function import logging_config
  from sagemaker.remote_function.core.pipeline_variables import Context, resolve_pipeline_variables
  import sagemaker.remote_function.core.serialization
  from sagemaker.session import Session
label_desc: Use image node_id 2 for calling the StoredFunction obj's underlying member method code with example usage: obj.save(func) without return types