code: def _get_type_of_macro(macros, objs):
          r
          for macro in macros:
              # ARGN Macros
              if re.match(r'ARG\d', macro):
                  macros[macro]['type'] = 'ARGN'
                  continue
              # USERN macros
              # are managed in the Config class, so no
              # need to look that here
              elif re.match(r'_HOST\w', macro):
                  macros[macro]['type'] = 'CUSTOM'
                  macros[macro]['class'] = 'HOST'
                  continue
              elif re.match(r'_SERVICE\w', macro):
                  macros[macro]['type'] = 'CUSTOM'
                  macros[macro]['class'] = 'SERVICE'
                  # value of macro: re.split('_HOST', '_HOSTMAC_ADDRESS')[1]
                  continue
              elif re.match(r'_CONTACT\w', macro):
                  macros[macro]['type'] = 'CUSTOM'
                  macros[macro]['class'] = 'CONTACT'
                  continue
              # On demand macro
              elif len(macro.split(':')) > 1:
                  macros[macro]['type'] = 'ONDEMAND'
                  continue
              # OK, classical macro...
              for obj in objs:
                  if macro in obj.macros:
                      macros[macro]['type'] = 'object'
                      macros[macro]['object'] = obj
                      continue
docs: r"""Set macros types
  
          Example::
  
          ARG\d -> ARGN,
          HOSTBLABLA -> class one and set Host in class)
          _HOSTTOTO -> HOST CUSTOM MACRO TOTO
          SERVICESTATEID:srv-1:Load$ -> MACRO SERVICESTATEID of the service Load of host srv-1
  
          :param macros: macros list in a dictionary
          :type macros: dict
          :param objs: objects list, used to tag object macros
          :type objs: list
          :return: None