def METHOD_NAME(self, search: str) -> Graph:
    def process_data_line(data: Json, METHOD_NAME: Graph) -> None:
        """Process a single line of resotocore graph data"""
        if data.get("type") == "node":
            node_id = data.get("id")
            node = node_from_dict(data)
            node_mapping[node_id] = node
            log.debug(f"Adding node {node} to the graph")
            METHOD_NAME.add_node(node)
            if node.kind == "graph_root":
                log.debug(f"Setting graph root {node}")
                METHOD_NAME.root = node
        elif data.get("type") == "edge":
            node_from = data.get("from")
            node_to = data.get("to")
            edge_type = EdgeType.from_value(data.get("edge_type"))
            if node_from not in node_mapping or node_to not in node_mapping:
                raise ValueError(f"One of {node_from} -> {node_to} unknown")
            METHOD_NAME.add_edge(node_mapping[node_from], node_mapping[node_to], edge_type=edge_type)
    METHOD_NAME = Graph()
    node_mapping: Dict[Any, Any] = {}
    for data in self.search(search):
        try:
            process_data_line(data, METHOD_NAME)
        except ValueError as e:
            log.error(e)
            continue
    sanitize(METHOD_NAME)
    return METHOD_NAME