class_docstr: Class for handling FeatureProcessor S3 Artifact Lineage
class_docstr_tok: ["Class","for","handling","FeatureProcessor","S3","Artifact","Lineage"]
docstr: Create the FeatureProcessor Pipeline's transformation code Artifact.
  
  Arguments:
      transformation_code (TransformationCode): The transformation code to be retrieved.
      pipeline_last_update_time (str): The last update time of the pipeline.
      sagemaker_session (Session): Session object which manages interactions
          with Amazon SageMaker APIs and any other AWS services needed. If not specified, the
          function creates one using the default AWS configuration chain.
  
  Returns:
      Artifact: The transformation code artifact.
docstr_tok: ["Create","the","FeatureProcessor","Pipeline","'s","transformation","code","Artifact",".","Arguments",":","transformation_code","(","TransformationCode",")",":","The","transformation","code","to","be","retrieved",".","pipeline_last_update_time","(","str",")",":","The","last","update","time","of","the","pipeline",".","sagemaker_session","(","Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","If","not","specified",",","the","function","creates","one","using","the","default","AWS","configuration","chain",".","Returns",":","Artifact",":","The","transformation","code","artifact","."]
code: def create_transformation_code_artifact(
      transformation_code: TransformationCode,
      pipeline_last_update_time: str,
      sagemaker_session: Session,
  ) -> Optional[Artifact]:
      """Create the FeatureProcessor Pipeline's transformation code Artifact.
  
      Arguments:
          transformation_code (TransformationCode): The transformation code to be retrieved.
          pipeline_last_update_time (str): The last update time of the pipeline.
          sagemaker_session (Session): Session object which manages interactions
              with Amazon SageMaker APIs and any other AWS services needed. If not specified, the
              function creates one using the default AWS configuration chain.
  
      Returns:
          Artifact: The transformation code artifact.
      """
      if transformation_code is None:
          return None
  
      properties = dict(
          state=TRANSFORMATION_CODE_STATUS_ACTIVE,
          inclusive_start_date=pipeline_last_update_time,
      )
      if transformation_code.name is not None:
          properties["name"] = transformation_code.name
      if transformation_code.author is not None:
          properties["author"] = transformation_code.author
  
      return S3LineageEntityHandler._create_artifact(
          s3_uri=transformation_code.s3_uri,
          source_types=[
              dict(
                  SourceIdType="Custom", Value=pipeline_last_update_time
              )
          ],
          properties=properties,
          artifact_type="TransformationCode",
          artifact_name=f"{FEP_LINEAGE_PREFIX}-"
          f"{TRANSFORMATION_CODE_ARTIFACT_NAME}-"
          f"{pipeline_last_update_time}",
          sagemaker_session=sagemaker_session,
      )
  
imports: from __future__ import absolute_import
  import logging
  from typing import Union, Optional, List
  from sagemaker import Session
  from sagemaker.feature_store.feature_processor import CSVDataSource, ParquetDataSource, BaseDataSource
  from sagemaker.feature_store.feature_processor.lineage._feature_processor_lineage_name_helper import _get_feature_processor_schedule_lineage_artifact_name, _get_feature_processor_trigger_lineage_artifact_name
  from sagemaker.feature_store.feature_processor.lineage._pipeline_schedule import PipelineSchedule
  from sagemaker.feature_store.feature_processor.lineage._pipeline_trigger import PipelineTrigger
  from sagemaker.feature_store.feature_processor.lineage._transformation_code import TransformationCode
  from sagemaker.feature_store.feature_processor.lineage.constants import TRANSFORMATION_CODE_STATUS_ACTIVE, FEP_LINEAGE_PREFIX, TRANSFORMATION_CODE_ARTIFACT_NAME
  from sagemaker.lineage.artifact import Artifact, ArtifactSummary
label_desc: Use image node_id 3 for calling the S3LineageEntityHandler obj's underlying member method code with example usage: obj.create_transformation_code_artifact(transformation_code, pipeline_last_update_time, sagemaker_session) and returns: S3LineageEntityHandler, None