def METHOD_NAME(self, macro):
    args = split_key_val(macro)
    expected_args = [arg[0] for arg in self.ARGS]
    expected_argnum = len(self.ARGS)
    for arg in expected_args:
        if arg not in args:
            raise ValueError("Missing mandatory argument '{}' for macro '{}'".format(arg, self.ID))
    for arg in args:
        if arg not in expected_args:
            raise ValueError("Unexpected argument '{}' for macro '{}'".format(arg, self.ID))
    return args