def create_collapsible(results):
    """Creates a collapsible html element for a search result
    Args:
        - results (dict): mapping of result attributes

    Returns:
        - collapsible_data (list): list result attributes in
          order for collapsible element

    """
    collapsible_data = []
    for i in range(len(results)):
        try:
            x = results[i]["TI"]
        except KeyError:
            results[i]["TI"] = "No title available"
        try:
            x = results[i]["PMID"]
        except KeyError:
            results[i]["PMID"] = "No pubmed identifier available"
        try:
            x = results[i]["AU"]
        except KeyError:
            results[i]["AU"] = "No author(s) available"
        try:
            x = results[i]["AB"]
        except KeyError:
            results[i]["AB"] = "No abstract available"

        collapsible_data.append([])
        collapsible_data[i].append(results[i]["TI"])
        collapsible_data[i].append(results[i]["AU"])
        collapsible_data[i].append(results[i]["AB"])
        collapsible_data[i].append(results[i]["PMID"])
        collapsible_data[i].append(i)

    return collapsible_data