code: def save_base_shapes(model_or_shapes, file):
      if isinstance(model_or_shapes, nn.Module):
          sh = get_infshapes(model_or_shapes)
      elif isinstance(model_or_shapes, dict):
          sh = deepcopy(model_or_shapes)
      else:
          raise ValueError()
      sh = {k: s.base_shape() for k, s in sh.items()}
      s = yaml.dump(sh, None, indent=4)
      s = __BSH_COMMENT__ + s
      with open(file, "w") as f:
          f.write(s)
  
file_path: NeMo/nemo/collections/nlp/modules/common/megatron/mup/shape.py
imports: from copy import deepcopy
  import yaml
  from torch import nn
  from torch.nn import Linear
  from torch.nn.modules.conv import _ConvNd
  from nemo.collections.nlp.modules.common.megatron.mup.infshape import InfShape, zip_infshape
  from nemo.collections.nlp.modules.common.megatron.mup.layer import MuReadout, rescale_linear_bias
label_desc: Use image node_id 3 for calling a global function with example usage: save_base_shapes(model_or_shapes, file) without return types