code: def canonicalize(parsed_op):
      
      assert 'op' in parsed_op
      assert len(parsed_op['op']) == 2
  
      if parsed_op['op'][1] == TRANSFER_KEEP_DATA:
          parsed_op['keep_data'] = True
      elif parsed_op['op'][1] == TRANSFER_REMOVE_DATA:
          parsed_op['keep_data'] = False
      else:
          raise ValueError("Invalid op '{}'".format(parsed_op['op']))
  
      return parsed_op
docs: Get the "canonical form" of this operation, putting it into a form where it can be serialized
      to form a consensus hash.  This method is meant to preserve compatibility across blockstackd releases.
  
      For NAME_TRANSFER, this means:
      * add 'keep_data' flag