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",")","."]
docstr: Method identical to save_metadata BUT BYPASSES THE CHECK ON DONE
  
  @warning This method should not be used unless you know what you are doing. This
  will write metadata to a datastore that has been marked as done which is an
  assumption that other parts of metaflow rely on (ie: when a datastore is marked
  as done, it is considered to be read-only).
  
  Currently only used in the case when the task is executed remotely but there is
  no (remote) metadata service configured. We therefore use the datastore to share
  metadata between the task and the Metaflow local scheduler. Due to some other
  constraints and the current plugin API, we could not use the regular method
  to save metadata.
  
  This method requires mode 'w'
  
  Parameters
  ----------
  contents : Dict[string -> JSON-ifiable objects]
      Dictionary of metadata to store
  allow_overwrite : boolean, optional
      If True, allows the overwriting of the metadata, defaults to True
  add_attempt : boolean, optional
      If True, adds the attempt identifier to the metadata. defaults to
      True
docstr_tok: ["Method","identical","to","save_metadata","BUT","BYPASSES","THE","CHECK","ON","DONE","@","warning","This","method","should","not","be","used","unless","you","know","what","you","are","doing",".","This","will","write","metadata","to","a","datastore","that","has","been","marked","as","done","which","is","an","assumption","that","other","parts","of","metaflow","rely","on","(","ie",":","when","a","datastore","is","marked","as","done",",","it","is","considered","to","be","read-only",")",".","Currently","only","used","in","the","case","when","the","task","is","executed","remotely","but","there","is","no","(","remote",")","metadata","service","configured",".","We","therefore","use","the","datastore","to","share","metadata","between","the","task","and","the","Metaflow","local","scheduler",".","Due","to","some","other","constraints","and","the","current","plugin","API",",","we","could","not","use","the","regular","method","to","save","metadata",".","This","method","requires","mode","'","w'","Parameters","--","--","--","--","--","contents",":","Dict","[","string","-",">","JSON-ifiable","objects","]","Dictionary","of","metadata","to","store","allow_overwrite",":","boolean",",","optional","If","True",",","allows","the","overwriting","of","the","metadata",",","defaults","to","True","add_attempt",":","boolean",",","optional","If","True",",","adds","the","attempt","identifier","to","the","metadata",".","defaults","to","True"]
code: def _dangerous_save_metadata_post_done(
      self, contents, allow_overwrite=True, add_attempt=True
  ):
      """
      Method identical to save_metadata BUT BYPASSES THE CHECK ON DONE
  
      @warning This method should not be used unless you know what you are doing. This
      will write metadata to a datastore that has been marked as done which is an
      assumption that other parts of metaflow rely on (ie: when a datastore is marked
      as done, it is considered to be read-only).
  
      Currently only used in the case when the task is executed remotely but there is
      no (remote) metadata service configured. We therefore use the datastore to share
      metadata between the task and the Metaflow local scheduler. Due to some other
      constraints and the current plugin API, we could not use the regular method
      to save metadata.
  
      This method requires mode 'w'
  
      Parameters
      ----------
      contents : Dict[string -> JSON-ifiable objects]
          Dictionary of metadata to store
      allow_overwrite : boolean, optional
          If True, allows the overwriting of the metadata, defaults to True
      add_attempt : boolean, optional
          If True, adds the attempt identifier to the metadata. defaults to
          True
      """
      return self._save_file(
          {
              k: json.dumps(v).encode("utf-8")
              for k, v in contents.items()
          },
          allow_overwrite,
          add_attempt,
      )
  
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 21 for calling the TaskDataStore obj's underlying member method code with example usage: obj._dangerous_save_metadata_post_done(contents, allow_overwrite, add_attempt) and returns: self