code: def load_json_dict(filename, *args):
      """Checks if file exists. Returns {} if something fails."""
      data = {}
      if os.path.exists(filename):
          lock.acquire()
          with open(filename, "r") as f:
              try:
                  data = _json.load(f)
                  if not isinstance(data, dict):
                      data = {}
              except:
                  data = {}  # TODO: issue a warning and bubble it up
          lock.release()
          if args:
              return {key: data[key] for key in args if key in data}
      return data
  
file_path: plotly.py/packages/python/chart-studio/chart_studio/utils.py
imports: from __future__ import absolute_import
  import os.path
  import re
  import threading
  import warnings
  import json
  from _plotly_utils.exceptions import PlotlyError
  from _plotly_utils.optional_imports import get_module
label_desc: Use image node_id 1 for calling a global function with example usage: load_json_dict(filename) and returns: data, unknown