def get_pack_from_index(pack, proxy_config=None):
    """
    Search index by pack name.
    Returns a pack.
    """
    if not pack:
        raise ValueError("Pack name must be specified.")

    index, _ = fetch_pack_index(proxy_config=proxy_config)

    return index.get(pack)

    Search index by pack name.
    Returns a pack.
    
st2common/st2common/services/packs.py