docstr: Check attributes that can be dicts and format for all `self.cols`.
docstr_tok: ["Check","attributes","that","can","be","dicts","and","format","for","all","`","self.cols","`","."]
code: def _check_set_create_dict_attrs(self):
      """Check attributes that can be dicts and format for all `self.cols`."""
      dict_attrs = {
          "normalize": False,
          "min_group_name": None,
          "combine_min_nan_groups": True,
          "min_group_size": None,
          "handle_unknown": "value",
          "handle_missing": "value",
      }
  
      for attr_name, attr_default in dict_attrs.items():
          attr = copy(getattr(self, attr_name))
          if isinstance(attr, dict):
              for col in self.cols:
                  if col not in attr:
                      attr[col] = attr_default
              setattr(self, "_" + attr_name, attr)
          else:
              attr_dict = {}
              for col in self.cols:
                  attr_dict[col] = attr
              setattr(self, "_" + attr_name, attr_dict)
  
      for col in self.cols:
          if (
              self._handle_missing[col] == "return_nan"
              and self._combine_min_nan_groups[col] == "force"
          ):
              raise ValueError(
                  "Cannot have `handle_missing` == 'return_nan' and "
                  f"'combine_min_nan_groups' == 'force' for columns `{col}`."
              )
  
          if (
              self._combine_min_nan_groups[col] is not True
              and self._min_group_size[col] is None
          ):
              raise ValueError(
                  f"`combine_min_nan_groups` only works when `min_group_size` is set for column {col}."
              )
  
          if (
              self._min_group_name[col] is not None
              and self._min_group_size[col] is None
          ):
              raise ValueError(
                  f"`min_group_name` only works when `min_group_size` is set for column {col}."
              )
  
file_path: category_encoders/category_encoders/count.py
imports: import numpy
  import pandas
  import category_encoders.utils
  from category_encoders.ordinal import OrdinalEncoder
  from copy import copy
label_desc: Use image node_id 7 for calling the CountEncoder obj's underlying member method code with example usage: obj._check_set_create_dict_attrs() without return types