class_docstr: An Amazon SageMaker artifact, which is part of a SageMaker lineage.
  
  Examples:
      .. code-block:: python
  
          from sagemaker.lineage import artifact
  
          my_artifact = artifact.Artifact.create(
              artifact_name='MyArtifact',
              artifact_type='S3File',
              source_uri='s3://...')
  
          my_artifact.properties["added"] = "property"
          my_artifact.save()
  
          for artfct in artifact.Artifact.list():
              print(artfct)
  
          my_artifact.delete()
  
  Attributes:
      artifact_arn (str): The ARN of the artifact.
      artifact_name (str): The name of the artifact.
      artifact_type (str): The type of the artifact.
      source (obj): The source of the artifact with a URI and types.
      properties (dict): Dictionary of properties.
      tags (List[dict[str, str]]): A list of tags to associate with the artifact.
      creation_time (datetime): When the artifact was created.
      created_by (obj): Contextual info on which account created the artifact.
      last_modified_time (datetime): When the artifact was last modified.
      last_modified_by (obj): Contextual info on which account created the artifact.
class_docstr_tok: ["An","Amazon","SageMaker","artifact",",","which","is","part","of","a","SageMaker","lineage",".","Examples",":","..","code-block",":",":","python","from","sagemaker.lineage","import","artifact","my_artifact","=","artifact.Artifact.create","(","artifact_name='MyArtifact","'",",","artifact_type='S3File","'",",","source_uri='s3",":","\/\/","...","'",")","my_artifact.properties","[","``","added","''","]","=","``","property","''","my_artifact.save","(",")","for","artfct","in","artifact.Artifact.list","(",")",":","print","(","artfct",")","my_artifact.delete","(",")","Attributes",":","artifact_arn","(","str",")",":","The","ARN","of","the","artifact",".","artifact_name","(","str",")",":","The","name","of","the","artifact",".","artifact_type","(","str",")",":","The","type","of","the","artifact",".","source","(","obj",")",":","The","source","of","the","artifact","with","a","URI","and","types",".","properties","(","dict",")",":","Dictionary","of","properties",".","tags","(","List","[","dict","[","str",",","str","]","]",")",":","A","list","of","tags","to","associate","with","the","artifact",".","creation_time","(","datetime",")",":","When","the","artifact","was","created",".","created_by","(","obj",")",":","Contextual","info","on","which","account","created","the","artifact",".","last_modified_time","(","datetime",")",":","When","the","artifact","was","last","modified",".","last_modified_by","(","obj",")",":","Contextual","info","on","which","account","created","the","artifact","."]
docstr: Use the lineage query to retrieve all trials that use this artifact.
  
  Args:
      direction (LineageQueryDirectionEnum, optional): The query direction.
  
  Returns:
      [Trial]: A list of SageMaker `Trial` objects.
docstr_tok: ["Use","the","lineage","query","to","retrieve","all","trials","that","use","this","artifact",".","Args",":","direction","(","LineageQueryDirectionEnum",",","optional",")",":","The","query","direction",".","Returns",":","[","Trial","]",":","A","list","of","SageMaker","`","Trial","`","objects","."]
code: def _trials(
      self,
      direction: LineageQueryDirectionEnum = LineageQueryDirectionEnum.BOTH,
  ) -> List:
      """Use the lineage query to retrieve all trials that use this artifact.
  
      Args:
          direction (LineageQueryDirectionEnum, optional): The query direction.
  
      Returns:
          [Trial]: A list of SageMaker `Trial` objects.
      """
      query_filter = LineageFilter(
          entities=[LineageEntityEnum.TRIAL_COMPONENT]
      )
      query_result = LineageQuery(self.sagemaker_session).query(
          start_arns=[self.artifact_arn],
          query_filter=query_filter,
          direction=direction,
          include_edges=False,
      )
      trial_component_arns: list = list(
          map(lambda x: x.arn, query_result.vertices)
      )
      return self._get_trial_from_trial_component(trial_component_arns)
  
imports: from __future__ import absolute_import
  import logging
  import math
  from datetime import datetime
  from typing import Iterator, Union, Any, Optional, List
  from sagemaker.apiutils import _base_types, _utils
  from sagemaker.lineage import _api_types
  from sagemaker.lineage._api_types import ArtifactSource, ArtifactSummary
  from sagemaker.lineage.query import LineageQuery, LineageFilter, LineageSourceEnum, LineageEntityEnum, LineageQueryDirectionEnum
  from sagemaker.lineage._utils import _disassociate, get_resource_name_from_arn
  from sagemaker.lineage.association import Association
  from sagemaker.utils import get_module, format_tags
label_desc: Use image node_id 7 for calling the Artifact obj's underlying member method code with example usage: obj._trials(direction) and returns: self