def params_to_dict(params, dct):
 for (param, val) in params.items():
  if (val is None):
   continue
  dct[param] = val
 return dct

def params_to_dict ( params , dct ) : for ( param , val ) in params . items ( ) : if ( val is None ) : continue dct [ param ] = val return dct
updates the dct dictionary with the params dictionary .