class_docstr: TaskDataStore is obtained through FlowDataStore.get_datastore_for_task and
  is used to store three things:
      - Task artifacts (using save_artifacts and load_artifacts) which will
        ultimately be stored using ContentAddressedStore's save_blobs and
        load_blobs. This is basically the content indexed portion of the
        storage (identical objects are stored only once).
      - Metadata information (using save_metadata and load_metadata) which
        stores JSON encoded metadata about a task in a non-content indexed
        way in a hierarchical manner (ie: the files are stored
        in a path indicated by the pathspec (run_id/step_name/task_id)).
        This portion of the store can be viewed as name indexed (storing
        two metadata items with the same name will overwrite the previous item
        so the condition of equality is the name as
        opposed to the content).
      - Logs which are a special sort of task metadata but are handled
        differently (they are not JSON-encodable dictionaries).
class_docstr_tok: ["TaskDataStore","is","obtained","through","FlowDataStore.get_datastore_for_task","and","is","used","to","store","three","things",":","-","Task","artifacts","(","using","save_artifacts","and","load_artifacts",")","which","will","ultimately","be","stored","using","ContentAddressedStore","'s","save_blobs","and","load_blobs",".","This","is","basically","the","content","indexed","portion","of","the","storage","(","identical","objects","are","stored","only","once",")",".","-","Metadata","information","(","using","save_metadata","and","load_metadata",")","which","stores","JSON","encoded","metadata","about","a","task","in","a","non-content","indexed","way","in","a","hierarchical","manner","(","ie",":","the","files","are","stored","in","a","path","indicated","by","the","pathspec","(","run_id\/step_name\/task_id",")",")",".","This","portion","of","the","store","can","be","viewed","as","name","indexed","(","storing","two","metadata","items","with","the","same","name","will","overwrite","the","previous","item","so","the","condition","of","equality","is","the","name","as","opposed","to","the","content",")",".","-","Logs","which","are","a","special","sort","of","task","metadata","but","are","handled","differently","(","they","are","not","JSON-encodable","dictionaries",")","."]
code: def _metadata_name_for_attempt(self, name, attempt_override=None):
      return self.metadata_name_for_attempt(
          name,
          self._attempt
          if attempt_override is None
          else attempt_override,
      )
  
imports: from collections import defaultdict
  import json
  import pickle
  import sys
  import time
  from functools import wraps
  from io import BufferedIOBase, FileIO, RawIOBase
  from types import MethodType, FunctionType
  from ..None import metaflow_config
  from ..exception import MetaflowInternalError
  from ..metadata import DataArtifact, MetaDatum
  from ..parameters import Parameter
  from ..util import Path, is_stringish, to_fileobj
  from .exceptions import DataException, UnpicklableArtifactException
label_desc: Use image node_id 40 for calling the TaskDataStore obj's underlying member method code with example usage: obj._metadata_name_for_attempt(name, attempt_override) and returns: self