code: def from_json_plotly(value, engine=None):
      """
      Parse JSON string using the specified JSON engine
  
      Parameters
      ----------
      value: str or bytes
          A JSON string or bytes object
  
      engine: str (default None)
          The JSON decoding engine to use. One of:
            - if "json", parse JSON using built in json module
            - if "orjson", parse using the faster orjson module, requires the orjson
              package
            - if "auto" use orjson module if available, otherwise use the json module
  
          If not specified, the default engine is set to the current value of
          plotly.io.json.config.default_engine.
  
      Returns
      -------
      dict
  
      See Also
      --------
      from_json_plotly : Parse JSON with plotly conventions into a dict
      """
      orjson = get_module("orjson", should_load=True)
  
      # Validate value
      # --------------
      if not isinstance(value, (str, bytes)):
          raise ValueError(
              """
  from_json_plotly requires a string or bytes argument but received value of type {typ}
      Received value: {value}""".format(
                  typ=type(value), value=value
              )
          )
  
      # Determine json engine
      if engine is None:
          engine = config.default_engine
  
      if engine == "auto":
          if orjson is not None:
              engine = "orjson"
          else:
              engine = "json"
      elif engine not in ["orjson", "json"]:
          raise ValueError("Invalid json engine: %s" % engine)
  
      if engine == "orjson":
          JsonConfig.validate_orjson()
          # orjson handles bytes input natively
          value_dict = orjson.loads(value)
      else:
          # decode bytes to str for built-in json module
          if isinstance(value, bytes):
              value = value.decode("utf-8")
          value_dict = json.loads(value)
  
      return value_dict
  
imports: import json
  import decimal
  import datetime
  import warnings
  from pathlib import Path
  from plotly.io._utils import validate_coerce_fig_to_dict, validate_coerce_output_type
  from _plotly_utils.optional_imports import get_module
  from _plotly_utils.basevalidators import ImageUriValidator
label_desc: Use image node_id 6 for calling a global function with example usage: from_json_plotly(value, engine) and returns: value_dict