code: def _verify_metric_fn_args(metric_fn):
      if not metric_fn:
          return
      # Calling low level getargs for py_2_and_3 compatibility.
      args = set(inspect.getargs(metric_fn.__code__).args)
      invalid_args = list(args - _VALID_METRIC_FN_ARGS)
      if invalid_args:
          raise ValueError(
              "metric_fn (%s) has following not expected args: %s"
              % (metric_fn, invalid_args)
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import contextlib
  import copy
  import functools
  import inspect
  import os
  from absl import logging
  from adanet import ensemble
  from adanet import subnetwork
  from adanet import tf_compat
  from adanet.core.architecture import _Architecture
  from adanet.core.eval_metrics import _EnsembleMetrics
  from adanet.core.eval_metrics import _SubnetworkMetrics
  from adanet.core.summary import monkey_patched_summaries
  import tensorflow.compat.v1
  import tensorflow.compat.v2
label_desc: Use image node_id 1 for calling a global function with example usage: _verify_metric_fn_args(metric_fn) without return types