code: def _validate_namespace_whitelist(namespace_whitelist):
      """Validates namespace whitelist argument."""
      if namespace_whitelist is None:
          return None
      if not isinstance(namespace_whitelist, list):
          raise TypeError(
              "`namespace_whitelist` must be a list of strings. Got: "
              f"{namespace_whitelist} with type "
              f"{type(namespace_whitelist)}."
          )
  
      processed = []
      for namespace in namespace_whitelist:
          if not isinstance(namespace, str):
              raise ValueError(
                  "Whitelisted namespace must be a string. Got: "
                  f"{namespace} of type {type(namespace)}."
              )
          processed.append(compat.as_str(namespace))
      return processed
  
file_path: tensorflow-upstream/tensorflow/python/saved_model/save_options.py
imports: import enum
  from tensorflow.python.checkpoint.sharding import sharding_util
  from tensorflow.python.util import compat
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_namespace_whitelist(namespace_whitelist) and returns: processed, None