Add secondary files only if present locally or remotely.

def _add_secondary_if_exists(secondary, out, get_retriever):
    """Add secondary files only if present locally or remotely.
    """
    secondary = [_file_local_or_remote(y, get_retriever) for y in secondary]
    secondary = [z for z in secondary if z]
    if secondary:
        out["secondaryFiles"] = [{"class": "File", "path": f} for f in secondary]
    return out