original_docstring: Helper function to parse operator attributes in required format.
docstring: Helper function to parse operator attributes in required format.
docstring_tokens: Helper function to parse operator attributes in required format .
code: def parse_helper(attrs, attrs_name, alt_value=None):
      """Helper function to parse operator attributes in required format."""
      tuple_re = re.compile('\([0-9L|,| ]+\)')
      if attrs is None:
          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("Malformed %s dimensions: %s" % (attrs_name, str(attrs_str)))
      return alt_value
code_tokens: def parse_helper ( attrs , attrs_name , alt_value = None ) : tuple_re = re . compile ( '\([0-9L|,| ]+\)' ) if attrs is None : 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 ( "Malformed %s dimensions: %s" % ( attrs_name , str ( attrs_str ) ) ) return alt_value
short_docstring: Helper function to parse operator attributes in required format.
short_docstring_tokens: Helper function to parse operator attributes in required format .
comment: """Helper function to parse operator attributes in required format."""