<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def freeze(G):
 """Modify graph to prevent further change by adding or removing nodes or edges. Node and edge data can still be modified. Parameters G : graph A NetworkX graph Notes ----- To "unfreeze" a graph you must make a copy by creating a new graph object. See Also -------- is_frozen """

    G.add_node = frozen
    G.add_nodes_from = frozen
    G.remove_node = frozen
    G.remove_nodes_from = frozen
    G.add_edge = frozen
    G.add_edges_from = frozen
    G.remove_edge = frozen
    G.remove_edges_from = frozen
    G.clear = frozen
    G.frozen = True
    return G