code: def emit_dims_by_name(self, ax_name):
      if ax_name == "*":
          raise NotImplementedError()
      target_ax = self.get_leading_target(ax_name)
      source_dims, parted = dict(), 0
      for i, right in enumerate(self.rights):
          if target_ax not in right.ax2id:
              source_dims[i] = -1
              continue
          ids = right.ax2id[target_ax]
          if isinstance(ids, int):
              source_dims[i] = ids
          elif ids[1] == 0:
              source_dims[i] = ids[0]
          else:
              raise NotImplementedError()
          parted += 1
      return source_dims, parted
  
imports: import os, sys, json, re
  import tempfile
  import copy
  import inspect
  import logging
  import importlib
  from .None import solver
  from .None import patterns
label_desc: Use image node_id 4 for calling the Parser obj's underlying member method code with example usage: obj.emit_dims_by_name(ax_name) and returns: source_dims,  parted