class_docstr: A collection of parameters, metrics, and artifacts to create a ML model.
class_docstr_tok: ["A","collection","of","parameters",",","metrics",",","and","artifacts","to","create","a","ML","model","."]
docstr: Generate the TrialComponentName based on run_name and experiment_name
  
  Args:
      run_name (str): The run_name supplied by the user.
      experiment_name (str): The experiment_name supplied by the user,
          which is prepended to the run_name to generate the TrialComponentName.
  
  Returns:
      str: The TrialComponentName used to create a trial component
          which is unique in an account.
  
  Raises:
      ValueError: If either the run_name or the experiment_name exceeds
          the length limit.
docstr_tok: ["Generate","the","TrialComponentName","based","on","run_name","and","experiment_name","Args",":","run_name","(","str",")",":","The","run_name","supplied","by","the","user",".","experiment_name","(","str",")",":","The","experiment_name","supplied","by","the","user",",","which","is","prepended","to","the","run_name","to","generate","the","TrialComponentName",".","Returns",":","str",":","The","TrialComponentName","used","to","create","a","trial","component","which","is","unique","in","an","account",".","Raises",":","ValueError",":","If","either","the","run_name","or","the","experiment_name","exceeds","the","length","limit","."]
code: def _generate_trial_component_name(
      run_name: str, experiment_name: str
  ) -> str:
      """Generate the TrialComponentName based on run_name and experiment_name
  
      Args:
          run_name (str): The run_name supplied by the user.
          experiment_name (str): The experiment_name supplied by the user,
              which is prepended to the run_name to generate the TrialComponentName.
  
      Returns:
          str: The TrialComponentName used to create a trial component
              which is unique in an account.
  
      Raises:
          ValueError: If either the run_name or the experiment_name exceeds
              the length limit.
      """
      buffer = 1  # leave length buffers for delimiters
      max_len = int(MAX_NAME_LEN_IN_BACKEND / 2) - buffer
      err_msg_template = "The {} (length: {}) must have length less than or equal to {}"
      if len(run_name) > max_len:
          raise ValueError(
              err_msg_template.format(
                  "run_name", len(run_name), max_len
              )
          )
      if len(experiment_name) > max_len:
          raise ValueError(
              err_msg_template.format(
                  "experiment_name", len(experiment_name), max_len
              )
          )
      trial_component_name = "{}{}{}".format(
          experiment_name, DELIMITER, run_name
      )
      # due to mixed-case concerns on the backend
      trial_component_name = trial_component_name.lower()
      return trial_component_name
  
imports: from __future__ import absolute_import
  import datetime
  import logging
  from enum import Enum
  from math import isnan, isinf
  from numbers import Number
  from typing import Optional, List, Dict, TYPE_CHECKING, Union
  import dateutil
  from numpy import array
  from sagemaker.apiutils import _utils
  from sagemaker.experiments import _api_types
  from sagemaker.experiments._api_types import TrialComponentArtifact, _TrialComponentStatusType
  from sagemaker.experiments._helper import _ArtifactUploader, _LineageArtifactTracker, _DEFAULT_ARTIFACT_PREFIX
  from sagemaker.experiments._environment import _RunEnvironment
  from sagemaker.experiments._run_context import _RunContext
  from sagemaker.experiments.experiment import Experiment
  from sagemaker.experiments._metrics import _MetricsManager
  from sagemaker.experiments.trial import _Trial
  from sagemaker.experiments.trial_component import _TrialComponent
  from sagemaker.utils import get_module, unique_name_from_base, format_tags, Tags, TagsDict
  from sagemaker.experiments._utils import guess_media_type, resolve_artifact_name, verify_length_of_true_and_predicted, validate_invoked_inside_run_context, get_tc_and_exp_config_from_job_env, verify_load_input_names, is_run_trial_component
label_desc: Use image node_id 16 for calling the Run obj's underlying member method code with example usage: obj._generate_trial_component_name(run_name, experiment_name) and returns: trial_component_name