code: def params_to_dict(params, dct):
      
      for param, val in params.items():
          if val is None:
              continue
          dct[param] = val
      return dct
docs: Updates the 'dct' dictionary with the 'params' dictionary, filtering out
      all those whose param value is None.