code: def reset_properties_fsa(graph: "k2.Fsa"):
      """Resets properties of a graph.
      In-place (does not create a new graph) if the graph is on GPU.
      Use this every time you alter a graph in-place.
      See https://github.com/k2-fsa/k2/issues/978 for more information.
      """
      graph.__dict__["_properties"] = None
      # CPU graphs need to be sorted e.g. for intersection
      if graph.device == torch.device("cpu"):
          graph = k2.arc_sort(graph)
      return graph
  
imports: import os
  import struct
  from pickle import UnpicklingError
  from typing import List, Optional, Tuple, Union
  import torch
  from nemo.core.utils.k2_guard import k2
  from nemo.utils import logging
label_desc: Use image node_id 12 for calling a global function with example usage: reset_properties_fsa(graph) and returns: graph