code: def get_expected_layout(in_layout, axes, keep_dims):
      in_layout = in_layout or ""
      if keep_dims or not in_layout:
          return in_layout
      if axes is None:
          return ""
      if isinstance(axes, int):
          axes = [axes]
      ndim = len(in_layout)
      axes = [(axis + ndim) % ndim for axis in axes]
      return "".join(
          c for i, c in enumerate(in_layout) if i not in axes
      )
  
imports: import nvidia.dali.fn
  from nvidia.dali.pipeline import Pipeline
  from nose.tools import nottest
  import numpy
  from test_utils import np_type_to_dali
  from nose_utils import assert_raises
label_desc: Use image node_id 1 for calling a global function with example usage: get_expected_layout(in_layout, axes, keep_dims) and returns: str, in_layout, str