code: def _convert_nonstring_categoricals(self, param_dict):
          
          return {name: (self.categorical_mappings_[name][val] if name in self.categorical_mappings_ else val)
                  for (name, val) in param_dict.items()}
docs: Apply the self.categorical_mappings_ mappings where necessary.