class_docstr: Creates a dataframe containing the lineage assoociations of a SageMaker object.
docstr: Get a human readable name from the association.
  
  Args:
      name (str): The name of the associated entity
      arn (str): The arn of the associated entity
      entity_type (str): The type of the associated entity (artifact, action, etc...)
  
  Returns:
      str: The name for the association that will be displayed in the data frame.
docstr_tok: ["Get","a","human","readable","name","from","the","association",".","Args",":","name","(","str",")",":","The","name","of","the","associated","entity","arn","(","str",")",":","The","arn","of","the","associated","entity","entity_type","(","str",")",":","The","type","of","the","associated","entity","(","artifact",",","action",",","etc","...",")","Returns",":","str",":","The","name","for","the","association","that","will","be","displayed","in","the","data","frame","."]
code: def _get_friendly_name(
      self, name: str, arn: str, entity_type: str
  ) -> str:
      """Get a human readable name from the association.
  
      Args:
          name (str): The name of the associated entity
          arn (str): The arn of the associated entity
          entity_type (str): The type of the associated entity (artifact, action, etc...)
  
      Returns:
          str: The name for the association that will be displayed in the data frame.
      """
      if name:
          return name
  
      if entity_type == "artifact":
          artifact = self._session.sagemaker_client.describe_artifact(
              ArtifactArn=arn
          )
          uri = artifact["Source"]["SourceUri"]
  
          # shorten the uri if the length is more than 40,
          # e.g s3://flintstone-end-to-end-tests-gamma-us-west-2-069083975568/results/
          # canary-auto-1608761252626/preprocessed-data/tuning_data/train.txt
          # become s3://.../preprocessed-data/tuning_data/train.txt
          if len(uri) > 48:
              name = uri[:5] + "..." + uri[len(uri) - 40 :]
  
          # if not then use the full uri
          if not name:
              name = uri
  
      # if still don't have name derive from arn
      if not name:
          name = arn.split(":")[5].split("/")[1]
  
      return name
  
imports: from __future__ import absolute_import
  import logging
  from typing import Optional, Any, Iterator
  import pandas
  from pandas import DataFrame
  from sagemaker.lineage._api_types import AssociationSummary
  from sagemaker.lineage.association import Association
label_desc: Use image node_id 13 for calling the LineageTableVisualizer obj's underlying member method code with example usage: obj._get_friendly_name(name, arn, entity_type) and returns: name, name