code: def run(network_pkl, metrics, dataset, data_dir, mirror_augment):
      print(
          'Evaluating metrics "%s" for "%s"...'
          % (",".join(metrics), network_pkl)
      )
      tflib.init_tf()
      network_pkl = pretrained_networks.get_path_or_url(network_pkl)
      dataset_args = dnnlib.EasyDict(tfrecord_dir=dataset, shuffle_mb=0)
      num_gpus = dnnlib.submit_config.num_gpus
      metric_group = metric_base.MetricGroup(
          [metric_defaults[metric] for metric in metrics]
      )
      metric_group.run(
          network_pkl,
          data_dir=data_dir,
          dataset_args=dataset_args,
          mirror_augment=mirror_augment,
          num_gpus=num_gpus,
      )
  
file_path: insightface/reconstruction/ostec/external/stylegan2/run_metrics.py
imports: import argparse
  import os
  import sys
  import dnnlib
  import dnnlib.tflib
  import pretrained_networks
  from metrics import metric_base
  from metrics.metric_defaults import metric_defaults
label_desc: Use image node_id 1 for calling a global function with example usage: run(network_pkl, metrics, dataset, data_dir, mirror_augment) without return types