def _validate_args(user_input_args: tuple[str, ...],
                   num_allowed: int,
                   *args: str) -> list:
    """
    Ensures kwargs entered in a function call are acceptable.

    Args:
        input (dict): The kwarg(s) input into a function.
        num_allowed (int): Limit, if any, on number of kwargs allowed.
        args (iterable): The acceptable keys for kwargs.

    Raises:
        SystemExit: Raised if input doesn't match any accepted kwargs.

    Returns:
        list: Containing user_input_args that passed test, if any.
    """
    # Establish lists for testing input and containing inputs that passed.
    acceptable_args = [arg for arg in args]
    lowercase_args = [item.lower() for item in acceptable_args]
    accepted_args = []
    # If user didn't input an arg, skip testing.
    if not len(user_input_args) > 0:
        return []
    # Test user_input_args against acceptable_args.
    for item in user_input_args:
        # Check if non-string args are in acceptable_args.
        if not isinstance(item, str) and item in acceptable_args:
            accepted_args.append(item)
        # Test string args as case-insensitive.
        elif item.lower() in lowercase_args:
            # Ensure output arg is properly cased even if input arg wasn't.
            right_arg = acceptable_args[lowercase_args.index(item.lower())]
            accepted_args.append(right_arg)
        # Skip unacceptable user_input_arg, removing it from args list.
        else:
            print(f'{item} removed - not in {acceptable_args}.')
            continue
    # Return user_input_args that passed test if not more than num_allowed.
    if len(accepted_args) > 0 and len(accepted_args) <= num_allowed:
        return accepted_args
    # Exit program.  user_input_args failed to validate.
    else:
        print('Keyword arg must be no more than'
              f' {num_allowed} of {".".join(acceptable_args)}.')
        raise SystemExit