code: def read_json(path, metrics_path, branch):
      try:
          df = pd.read_json(
              os.path.join(metrics_path, path), orient="index"
          )
          df = df.reset_index()
          df.rename(
              columns={0: branch, "index": "Metric"}, inplace=True
          )
          return df
      except:  # noqa: E722
          return None
  
imports: import os
  import numpy
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: read_json(path, metrics_path, branch) and returns: df, None