code: def _json_to_python_object(data):
      """Takes nested dictionaries and return a python object.
  
      Args:
        data: a nested dictionary.
  
      Returns:
        A python object with the dictionary values as attributes
  
      Example:
      Given the dictionary {"name": "john", "license": {"class": "d"}}
      returns an object output, where output.license.class is equal to "d" and
      output.name is "john"
      """
      data_string = json.dumps(data)
      return json.loads(
          data_string,
          object_hook=lambda d: collections.namedtuple("X", d.keys())(
              *d.values()
          ),
      )
  
file_path: model_search/model_search/metadata/trial.py
imports: import collections
  import json
label_desc: Use image node_id 2 for calling a global function with example usage: _json_to_python_object(data) and returns: json