code: def _convert_scalar_or_list(fn, scalar_or_list):
      if isinstance(scalar_or_list, list):
          return list(map(fn, scalar_or_list))
      else:
          return fn(scalar_or_list)
  
file_path: transform/tensorflow_transform/tf_metadata/metadata_io.py
imports: import json
  import os
  import tensorflow
  from tensorflow_transform.tf_metadata import dataset_metadata
  from tensorflow_transform.tf_metadata import schema_utils
  from google.protobuf import text_format
  from tensorflow.python.lib.io import file_io
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 7 for calling a global function with example usage: _convert_scalar_or_list(fn, scalar_or_list) and returns: list, fn