code: def get_hash(node,fields = None,exclude = ['pk','_id'],target = 'pk'):
      
  
      hasher = Hasher()
  
      def add_to_hash(value):
  
          if isinstance(value,dict):
              if target in value:
                  add_to_hash(value[target])
              else:
                  attribute_list = []
                  for key,v in sorted(value.items(),key = lambda x: x[0]):
  
                      if (fields is not None and key not in fields) \
                          or (exclude is not None and key in exclude):
                          continue
                      add_to_hash(key)
                      add_to_hash(v)
          elif isinstance(value,(tuple,list)) and value and isinstance(value[0],(dict,node_class)):
              for i,v in enumerate(value):
                  hasher.add(i)
                  add_to_hash(v)
          else:
              hasher.add(value)
  
      add_to_hash(node)
  
      return hasher.digest.hexdigest()
docs: Here we generate a unique hash for a given node in the syntax tree.