def METHOD_NAME(args):
    """Creates an authenticatior class instance for the given auth type
    Args:
        args (IPython.core.magics.namespace): The namespace object that is created from
        parsing %spark magic command
    Returns:
        An instance of a valid Authenticator or None if args.auth is 'None'
    Raises:
        sparkmagic.livyclientlib.BadUserConfigurationException: if args.auth is not a valid
        authenticator class.
    """
    if args.auth is None:
        auth = conf.get_auth_value(args.user, args.password)
    else:
        auth = args.auth
    if auth == constants.NO_AUTH:
        return None
    else:
        full_class = conf.authenticators().get(auth)
        if full_class is None:
            raise BadUserConfigurationException("Auth '{}' not supported".format(auth))
        module, class_name = (full_class).rsplit(".", 1)
        events_handler_module = importlib.import_module(module)
        auth_class = getattr(events_handler_module, class_name)
        return auth_class(args)