code: def _handle_legacy_output_transforms(
      output_transform, dynamic_kwargs
  ):
      global _print_legacy_warning
      legacy_kwargs = ["out_mul", "out_add", "out_shrink", "out_dtype"]
      if not any(kwarg in dynamic_kwargs for kwarg in legacy_kwargs):
          return output_transform, dynamic_kwargs
  
      if _print_legacy_warning:
          _print_legacy_warning = False
          print()
          print(
              "WARNING: Old-style output transformations in Network.run() are deprecated."
          )
          print(
              "Consider using 'output_transform=dict(func=tflib.convert_images_to_uint8)'"
          )
          print(
              "instead of 'out_mul=127.5, out_add=127.5, out_dtype=np.uint8'."
          )
          print()
      assert output_transform is None
  
      new_kwargs = dict(dynamic_kwargs)
      new_transform = {
          kwarg: new_kwargs.pop(kwarg)
          for kwarg in legacy_kwargs
          if kwarg in dynamic_kwargs
      }
      new_transform["func"] = _legacy_output_transform_func
      return new_transform, new_kwargs
  
imports: import types
  import inspect
  import re
  import uuid
  import sys
  import numpy
  import tensorflow
  from collections import OrderedDict
  from typing import Any, List, Tuple, Union
  from .None import tfutil
  from ..None import util
  from .tfutil import TfExpression, TfExpressionEx
label_desc: Use image node_id 2 for calling a global function with example usage: _handle_legacy_output_transforms(output_transform, dynamic_kwargs) and returns: new_transform,  new_kwargs, output_transform,  dynamic_kwargs