class_docstr: Base class for all `alibi` algorithms. Implements a structured approach to handle metadata.
class_docstr_tok: ["Base","class","for","all","`","alibi","`","algorithms",".","Implements","a","structured","approach","to","handle","metadata","."]
docstr: Updates the metadata of the object using the data from the `data_dict`. If the params option
  is specified, then each key-value pair is added to the metadata ``'params'`` dictionary.
  
  Parameters
  ----------
  data_dict
      Contains the data to be stored in the metadata.
  params
      If ``True``, the method updates the ``'params'`` attribute of the metadata.
docstr_tok: ["Updates","the","metadata","of","the","object","using","the","data","from","the","`","data_dict","`",".","If","the","params","option","is","specified",",","then","each","key-value","pair","is","added","to","the","metadata","``","'params","'","``","dictionary",".","Parameters","--","--","--","--","--","data_dict","Contains","the","data","to","be","stored","in","the","metadata",".","params","If","``","True","``",",","the","method","updates","the","``","'params","'","``","attribute","of","the","metadata","."]
code: def _update_metadata(
      self, data_dict: dict, params: bool = False
  ) -> None:
      """
      Updates the metadata of the object using the data from the `data_dict`. If the params option
      is specified, then each key-value pair is added to the metadata ``'params'`` dictionary.
  
      Parameters
      ----------
      data_dict
          Contains the data to be stored in the metadata.
      params
          If ``True``, the method updates the ``'params'`` attribute of the metadata.
      """
  
      if params:
          for key in data_dict.keys():
              self.meta["params"].update([(key, data_dict[key])])
      else:
          self.meta.update(data_dict)
  
imports: import abc
  import json
  import os
  from collections import ChainMap
  from typing import Any, Union
  import logging
  from functools import partial
  import pprint
  import attr
  from alibi.saving import load_explainer, save_explainer, NumpyEncoder
  from alibi.version import __version__
label_desc: Use image node_id 2 for calling the Base obj's underlying member method code with example usage: obj._update_metadata(data_dict, params) without return types