code: def parse_helper(attrs, attrs_name, alt_value=None):
      """Helper function to parse operator attributes in required format."""
      tuple_re = re.compile(r"\([0-9L|,| ]+\)")
      if not attrs:
          return alt_value
      attrs_str = (
          None
          if attrs.get(attrs_name) is None
          else str(attrs.get(attrs_name))
      )
      if attrs_str is None:
          return alt_value
      attrs_match = tuple_re.search(attrs_str)
      if attrs_match is not None:
          if attrs_match.span() == (0, len(attrs_str)):
              dims = eval(attrs_str)
              return dims
          else:
              raise AttributeError(
                  f"Malformed {attrs_name} dimensions: {str(attrs_str)}"
              )
      return alt_value
  
imports: import re
  import logging
  import numpy
  from .._export_onnx import MXNetGraph
label_desc: Use image node_id 1 for calling a global function with example usage: parse_helper(attrs, attrs_name, alt_value) and returns: alt_value, alt_value, alt_value, dims