code: def get_dynamic_axes(types, names):
      dynamic_axes = defaultdict(list)
      if names is not None:
          for name in names:
              if name in types:
                  dynamic_axes.update(
                      extract_dynamic_axes(name, types[name])
                  )
      return dynamic_axes
  
imports: from collections import defaultdict
  from typing import Dict, List, Optional
  from nemo.core.neural_types import AxisKind, NeuralType
label_desc: Use image node_id 3 for calling a global function with example usage: get_dynamic_axes(types, names) and returns: dynamic_axes