class_docstr: This class represents a SageMaker trial component object.
  
  A trial component is a stage in a trial.
  Trial components are created automatically within the SageMaker runtime and
  may not be created directly. To automatically associate trial components with
  a trial and experiment, supply an experiment config when creating a job.
  For example: https://docs.aws.amazon.com/sagemaker/latest/dg/API_CreateTrainingJob.html
  
  Attributes:
      trial_component_name (str): The name of the trial component. Generated by SageMaker
          from the name of the source job with a suffix specific to the type of source job.
      trial_component_arn (str): The ARN of the trial component.
      display_name (str): The name of the trial component that will appear in UI,
          such as SageMaker Studio.
      source (TrialComponentSource): A TrialComponentSource object with a source_arn attribute.
      status (str): Status of the source job.
      start_time (datetime): When the source job started.
      end_time (datetime): When the source job ended.
      creation_time (datetime): When the source job was created.
      created_by (obj): Contextual info on which account created the trial component.
      last_modified_time (datetime): When the trial component was last modified.
      last_modified_by (obj): Contextual info on which account last modified the trial component.
      parameters (dict): Dictionary of parameters to the source job.
      input_artifacts (dict): Dictionary of input artifacts.
      output_artifacts (dict): Dictionary of output artifacts.
      metrics (obj): Aggregated metrics for the job.
      parameters_to_remove (list): The hyperparameters to remove from the component.
      input_artifacts_to_remove (list): The input artifacts to remove from the component.
      output_artifacts_to_remove (list): The output artifacts to remove from the component.
      tags (List[Dict[str, str]]): A list of tags to associate with the trial component.
class_docstr_tok: ["This","class","represents","a","SageMaker","trial","component","object",".","A","trial","component","is","a","stage","in","a","trial",".","Trial","components","are","created","automatically","within","the","SageMaker","runtime","and","may","not","be","created","directly",".","To","automatically","associate","trial","components","with","a","trial","and","experiment",",","supply","an","experiment","config","when","creating","a","job",".","For","example",":","https",":","\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/API_CreateTrainingJob.html","Attributes",":","trial_component_name","(","str",")",":","The","name","of","the","trial","component",".","Generated","by","SageMaker","from","the","name","of","the","source","job","with","a","suffix","specific","to","the","type","of","source","job",".","trial_component_arn","(","str",")",":","The","ARN","of","the","trial","component",".","display_name","(","str",")",":","The","name","of","the","trial","component","that","will","appear","in","UI",",","such","as","SageMaker","Studio",".","source","(","TrialComponentSource",")",":","A","TrialComponentSource","object","with","a","source_arn","attribute",".","status","(","str",")",":","Status","of","the","source","job",".","start_time","(","datetime",")",":","When","the","source","job","started",".","end_time","(","datetime",")",":","When","the","source","job","ended",".","creation_time","(","datetime",")",":","When","the","source","job","was","created",".","created_by","(","obj",")",":","Contextual","info","on","which","account","created","the","trial","component",".","last_modified_time","(","datetime",")",":","When","the","trial","component","was","last","modified",".","last_modified_by","(","obj",")",":","Contextual","info","on","which","account","last","modified","the","trial","component",".","parameters","(","dict",")",":","Dictionary","of","parameters","to","the","source","job",".","input_artifacts","(","dict",")",":","Dictionary","of","input","artifacts",".","output_artifacts","(","dict",")",":","Dictionary","of","output","artifacts",".","metrics","(","obj",")",":","Aggregated","metrics","for","the","job",".","parameters_to_remove","(","list",")",":","The","hyperparameters","to","remove","from","the","component",".","input_artifacts_to_remove","(","list",")",":","The","input","artifacts","to","remove","from","the","component",".","output_artifacts_to_remove","(","list",")",":","The","output","artifacts","to","remove","from","the","component",".","tags","(","List","[","Dict","[","str",",","str","]","]",")",":","A","list","of","tags","to","associate","with","the","trial","component","."]
docstr: Returns a bool based on if trial_component is already associated with the trial.
  
  Args:
      trial_component_name (str): The name of the trial component.
      trial_name: (str): The name of the trial.
      sagemaker_session (sagemaker.session.Session): Session object which
          manages interactions with Amazon SageMaker APIs and any other
          AWS services needed.
  
  Returns:
      bool: A boolean variable indicating whether the trial component is already
            associated with the trial.
docstr_tok: ["Returns","a","bool","based","on","if","trial_component","is","already","associated","with","the","trial",".","Args",":","trial_component_name","(","str",")",":","The","name","of","the","trial","component",".","trial_name",":","(","str",")",":","The","name","of","the","trial",".","sagemaker_session","(","sagemaker.session.Session",")",":","Session","object","which","manages","interactions","with","Amazon","SageMaker","APIs","and","any","other","AWS","services","needed",".","Returns",":","bool",":","A","boolean","variable","indicating","whether","the","trial","component","is","already","associated","with","the","trial","."]
code: def _trial_component_is_associated_to_trial(
      cls, trial_component_name, trial_name=None, sagemaker_session=None
  ):
      """Returns a bool based on if trial_component is already associated with the trial.
  
      Args:
          trial_component_name (str): The name of the trial component.
          trial_name: (str): The name of the trial.
          sagemaker_session (sagemaker.session.Session): Session object which
              manages interactions with Amazon SageMaker APIs and any other
              AWS services needed.
  
      Returns:
          bool: A boolean variable indicating whether the trial component is already
                associated with the trial.
  
      """
      search_results = sagemaker_session.sagemaker_client.search(
          Resource="ExperimentTrialComponent",
          SearchExpression={
              "Filters": [
                  {
                      "Name": "TrialComponentName",
                      "Operator": "Equals",
                      "Value": str(trial_component_name),
                  },
                  {
                      "Name": "Parents.TrialName",
                      "Operator": "Equals",
                      "Value": str(trial_name),
                  },
              ]
          },
      )
      if search_results["Results"]:
          return True
      return False
  
file_path: sagemaker-python-sdk/src/sagemaker/experiments/trial_component.py
imports: from __future__ import absolute_import
  import time
  from botocore.exceptions import ClientError
  from sagemaker.apiutils import _base_types
  from sagemaker.experiments import _api_types
  from sagemaker.experiments._api_types import TrialComponentSearchResult
  from sagemaker.utils import format_tags
label_desc: Use image node_id 10 for calling the _TrialComponent obj's underlying member method code with example usage: obj._trial_component_is_associated_to_trial(cls, trial_component_name, trial_name, sagemaker_session) and returns: False, True