import re


def argument_exists(arg_name, args):
    """
    Test whether given argument name exists in given argument list.

    :param arg_name: Argument name.

    :param args: Argument list.

    :return: Whether given argument name exists in given argument list.
    """
    # Create regular expression object that matches `^_ARG_$` or `^_ARG_=`
    re_obj = re.compile('^%s(?:$|=)' % arg_name)

    # For given argument list's each argument
    for arg in args:
        # If the argument matches the regular expression
        if re_obj.search(arg):
            # Return True
            return True

    # If none of the arguments matches the regular expression.
    else:
        # Return False
        return False