def gather_processedfiles_for_expset(expset):
    """Collects all of the files for processed files.

    Args:
        expset(dict): Contains the embedded Experiment Set data.

    Returns:
    A dictionary with the following keys:
        genome_assembly(string, optional, default=""): The genome assembly all
            of the files use. Blank if there is an error or no files are found.
        files(list)                         : A list of identifiers for the
            discovered files.
        auto_generated_higlass_view_config(string, optional, default=None): Returns the uuid of the Higlass Item generated by a previous check.
        manual_higlass_view_config(string, optional, default=None): Returns the uuid of the Higlass Item that wasn't automatically generated.
        error(string, optional, default="") : Describes any errors generated.
    """

    # Collect all of the Processed files with a higlass uid.
    processed_files = []

    if "processed_files" in expset:
        # The Experiment Set may have Processed Files.
        processed_files = [ pf for pf in expset["processed_files"] if "higlass_uid" in pf ]

    # Search each Experiment, they may have Processed Files.
    if "experiments_in_set" in expset:
        for experiment in [ exp for exp in expset["experiments_in_set"] if "processed_files" in exp]:
            exp_processed_files = [ pf for pf in experiment["processed_files"] if "higlass_uid" in pf ]
            processed_files += exp_processed_files

    if len(processed_files) < 1:
        return {
            "error": "No processed files found",
            "files": [],
            "genome_assembly": "",
        }

    # Make sure all of them have the same genome assembly.
    genome_assembly_set = { pf["genome_assembly"] for pf in processed_files if "genome_assembly" in pf }

    if len(genome_assembly_set) > 1:
        return {
            "error": "Too many genome assemblies {gas}".format(gas=genome_assembly_set),
            "files": [],
            "genome_assembly": ""
        }

    # Return all of the processed files.
    unique_accessions = { pf["accession"] for pf in processed_files }

    unique_files = [{ "accession":pf["accession"], "status":pf["status"] } for pf in processed_files ]

    # Get the higlass uuid, if an auto generated view conf already exists.
    auto_generated_higlass_view_config = None
    manual_higlass_view_config = None
    if expset.get("static_content", None):
        processed_file_tabs = [ sc for sc in expset["static_content"] if sc["location"] == "tab:processed-files" ]

        auto_processed_file_tabs = [ sc for sc in processed_file_tabs if sc["description"] ==  "auto_generated_higlass_view_config" ]

        if auto_processed_file_tabs:
            auto_generated_higlass_view_config = auto_processed_file_tabs[0]["content"]["uuid"]
        elif processed_file_tabs:
            manual_higlass_view_config = processed_file_tabs[0]["uuid"]

    return {
        "error": "",
        "files": unique_files,
        "auto_generated_higlass_view_config": auto_generated_higlass_view_config,
        "manual_higlass_view_config": manual_higlass_view_config,
        "genome_assembly": processed_files[0]["genome_assembly"]
    }