code: def _check_plates_are_sensible(output_dims, nonoutput_ordinal):
      if output_dims and nonoutput_ordinal:
          raise ValueError(
              "It is nonsensical to preserve a plated dim without preserving "
              "all of that dim's plates, but found '{}' without '{}'".format(
                  output_dims, ",".join(nonoutput_ordinal)
              )
          )
  
imports: import itertools
  import warnings
  from collections import OrderedDict, defaultdict
  import opt_einsum
  import torch
  from opt_einsum import shared_intermediates
  from pyro.ops.rings import BACKEND_TO_RING, LogRing
  from pyro.util import ignore_jit_warnings
label_desc: Use image node_id 1 for calling a global function with example usage: _check_plates_are_sensible(output_dims, nonoutput_ordinal) without return types