def parse_mock(**kwargs):
    """Accepts as kwargs the following arguments to build a dictionary with an
    expected gist (dict) values: id (int), filename (str or list), description
    (str), user (str) and public (bool).
    """

    # filter the arguments
    id_num = kwargs.get("id", 1)
    id_ = "id_gist_{}".format(id_num)
    hash_ = "hash_gist_{}".format(id_num)
    gist_url = kwargs.get("url")
    user = kwargs.get("user", "janedoe")
    public = kwargs.get("public", True)

    filename = kwargs.get("filename", ".gist")
    if not isinstance(filename, list):
        filename = [filename]
    filename = sorted(filename)

    description = kwargs.get("description")
    if not description:
        description = filename[0]

    # build the file list
    files = list()
    struct = "{base}{user}/{id}/raw/{hash}/{filename}"
    base = "https://gist.githubusercontent.com/"
    for name in filename:
        url = struct.format(base=base, user=user, id=id_, hash=hash_, filename=name)
        files.append(dict(filename=name, raw_url=url))

    return dict(
        description=description, id=id_, files=files, url=gist_url, public=public
    )