def unify_instance(instance):
 newdict = dict()
 for (k, v) in six.iteritems(instance):
  if isinstance(v, datetime.datetime):
   v = v.replace(tzinfo=None)
  elif (k == 'fault'):
   continue
  elif (k == 'pci_devices'):
   continue
  newdict[k] = v
 return newdict

def unify_instance ( instance ) : newdict = dict ( ) for ( k , v ) in six . iteritems ( instance ) : if isinstance ( v , datetime . datetime ) : v = v . replace ( tzinfo = None ) elif ( k == 'fault' ) : continue elif ( k == 'pci_devices' ) : continue newdict [ k ] = v return newdict
return a dict-like instance for both object-initiated and model-initiated sources that can reasonably be compared .