def _extract_version_arg(arg_list):
    """Extract a version argument from an args list, raising an error if something is wrong.

    Args:
        arg_list (list): The input args to extract a version argument from. The `version` argument is expected to be the first argument.

    Returns:
        Any: The value in the specified argument index.

    Raises:
        TypeError: If the argument list is not long enough to access the specified index (since the function the argument list was taken from does not permit the required number of attributes).

    """
    try:
        version = arg_list[0]
    except IndexError:
        raise TypeError('The first argument of this function must be a specified version.')

    return version