def process_objects(
    all_objects: List[Dict[str, Any]],
) -> Tuple[Dict[str, Any], Dict[str, List[str]]]:
    """
    Processes all objects and establishes relationships.

    Parameters:
    all_objects: A list of dictionary objects fetched from the Luminar API.

    Returns:
    Tuple containing dictionary of items indexed by id and relationships dictionary.
    """
    item_by_id: Dict[str, Any] = {}
    relationships: Dict[str, List[str]] = {}

    for item in all_objects:
        item_by_id[item["id"]] = item
        if item.get("type") == "relationship":
            relationships.setdefault(str(item["target_ref"]), []).append(
                str(item["source_ref"])
            )

    return item_by_id, relationships

    Processes all objects and establishes relationships.

    Parameters:
    all_objects: A list of dictionary objects fetched from the Luminar API.

    Returns:
    Tuple containing dictionary of items indexed by id and relationships dictionary.
    
Solutions/CognyteLuminar/Data Connectors/CognyteLuminar/main.py