def METHOD_NAME(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(
        f"Serializing function code to {s3_path_join(self.s3_base_uri, FUNCTION_FOLDER)}"
    )
    serialization.serialize_func_to_s3(
        func=func,
        sagemaker_session=self.sagemaker_session,
        s3_uri=s3_path_join(self.s3_base_uri, FUNCTION_FOLDER),
        s3_kms_key=self.s3_kms_key,
        hmac_key=self.hmac_key,
    )
    logger.info(
        f"Serializing function arguments to {s3_path_join(self.s3_base_uri, ARGUMENTS_FOLDER)}"
    )
    serialization.serialize_obj_to_s3(
        obj=(args, kwargs),
        sagemaker_session=self.sagemaker_session,
        s3_uri=s3_path_join(self.s3_base_uri, ARGUMENTS_FOLDER),
        hmac_key=self.hmac_key,
        s3_kms_key=self.s3_kms_key,
    )