code: def get_parser():
      from pyparsing import (
          CharsNotIn,
          ParserElement,
          Suppress,
          ZeroOrMore,
      )
  
      ParserElement.enablePackrat()
  
      word = CharsNotIn(f"{PERIOD}{LBRACK}{RBRACK}")
      idx = Suppress(LBRACK) + word + Suppress(RBRACK)
      attr = Suppress(PERIOD) + word
      parser = word + ZeroOrMore(attr ^ idx)
      parser.setParseAction(PERIOD.join)
  
      return parser
  
imports: import os
  import re
  import typing
  from collections.abc import Iterable, Mapping
  from functools import singledispatch
  from funcy import memoize, rpartial
  from dvc.exceptions import DvcException
  from dvc.utils.flatten import flatten
label_desc: Use image node_id 1 for calling a global function with example usage: get_parser() and returns: parser