class_docstr: Retrieves job specific data from the environment.
docstr: Retrieves the trial component from the job in the environment.
  
  Args:
      sagemaker_session (sagemaker.session.Session): Session object which
          manages interactions with Amazon SageMaker APIs and any other
          AWS services needed. If not specified, one is created using the
          default AWS configuration chain.
  
  Returns:
      _TrialComponent: The trial component created from the job. None if not found.
docstr_tok: ["Retrieves","the","trial","component","from","the","job","in","the","environment",".","Args",":","sagemaker_session","(","sagemaker.session.Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","If","not","specified",",","one","is","created","using","the","default","AWS","configuration","chain",".","Returns",":","_TrialComponent",":","The","trial","component","created","from","the","job",".","None","if","not","found","."]
code: def get_trial_component(self, sagemaker_session: Session):
      """Retrieves the trial component from the job in the environment.
  
      Args:
          sagemaker_session (sagemaker.session.Session): Session object which
              manages interactions with Amazon SageMaker APIs and any other
              AWS services needed. If not specified, one is created using the
              default AWS configuration chain.
  
      Returns:
          _TrialComponent: The trial component created from the job. None if not found.
      """
  
      def _get_trial_component():
          summaries = list(
              trial_component._TrialComponent.list(
                  source_arn=self.source_arn.lower(),
                  sagemaker_session=sagemaker_session,
              )
          )
          if summaries:
              summary = summaries[0]
              return trial_component._TrialComponent.load(
                  trial_component_name=summary.trial_component_name,
                  sagemaker_session=sagemaker_session,
              )
          return None
  
      job_tc = None
      try:
          job_tc = retry_with_backoff(
              _get_trial_component, MAX_RETRY_ATTEMPTS
          )
      except Exception as ex:  # pylint: disable=broad-except
          logger.error(
              "Failed to get trail component in the current environment due to %s",
              str(ex),
          )
      return job_tc
  
file_path: sagemaker-python-sdk/src/sagemaker/experiments/_environment.py
imports: from __future__ import absolute_import
  import enum
  import json
  import logging
  import os
  from sagemaker import Session
  from sagemaker.experiments import trial_component
  from sagemaker.utils import retry_with_backoff
label_desc: Use image node_id 3 for calling the _RunEnvironment obj's underlying member method code with example usage: obj.get_trial_component(sagemaker_session) and returns: job_tc, None, trial_component