code: def _get_macros(chain):
          
          regex = re.compile(r'(\$)')
          elts = regex.split(chain)
          macros = {}
          in_macro = False
          for elt in elts:
              if elt == '$':
                  in_macro = not in_macro
              elif in_macro:
                  macros[elt] = {'val': '', 'type': 'unknown'}
  
          return macros
docs: Get all macros of a chain
          Cut '$' char and create a dict with the following structure::
  
          { 'MacroSTR1' : {'val': '', 'type': 'unknown'}
            'MacroSTR2' : {'val': '', 'type': 'unknown'}
          }
  
          :param chain: chain to parse
          :type chain: str
          :return: dict with macro parsed as key
          :rtype: dict