import random


def get_random_filename(file_list):
    """
    Gets a random filename from inside the ZipFile object,
    with the selected file extension
    :return: arbitrary filename of selected type (extension)
    """
    file_extension = '.xml'
    filename_list = [x.filename for x in file_list if x.filename.endswith(file_extension)]
    rand_idx = random.randint(0, len(filename_list) - 1)

    return filename_list[rand_idx]