def parse_meshrom_mg_file(
        cls,
        mg_fp,
        sfm_node_type,
        sfm_node_number,
        mesh_node_type,
        mesh_node_number,
        prepare_node_number,
        op=None,
    ):
        """Parse a :code:`Meshroom` project file (:code:`.mg`)."""

        cache_dp = os.path.join(os.path.dirname(mg_fp), "MeshroomCache")
        json_data = json.load(open(mg_fp, "r"))
        json_graph = json_data["graph"]

        sfm_fp = cls._get_sfm_fp(
            sfm_node_type, cache_dp, json_graph, sfm_node_number, op
        )

        mesh_fp = cls._get_mesh_fp(
            mesh_node_type, cache_dp, json_graph, mesh_node_number, op
        )

        image_dp = cls._get_image_dp(
            cache_dp, json_graph, prepare_node_number, op
        )

        if sfm_fp is not None:
            log_report("INFO", "Found the following sfm file: " + sfm_fp, op)
        else:
            log_report(
                "INFO",
                "Requested target SfM result does not exist in this meshroom"
                " project.",
                op,
            )

        if mesh_fp is not None:
            log_report("INFO", "Found the following mesh file: " + mesh_fp, op)
        else:
            log_report(
                "INFO",
                "Request target mesh does not exist in this meshroom project.",
                op,
            )

        return sfm_fp, mesh_fp, image_dp
Parse a :code:`Meshroom` project file (:code:`.mg`).
photogrammetry_importer/file_handlers/meshroom_file_handler.py