code: def def_emb_sz(classes, n, sz_dict=None):
      "Pick an embedding size for `n` depending on `classes` if not given in `sz_dict`."
      sz_dict = ifnone(sz_dict, {})
      n_cat = len(classes[n])
      sz = sz_dict.get(n, int(emb_sz_rule(n_cat)))  # rule of thumb
      return n_cat,sf def_emb_sz(classes, n, sz_dict=None):
      "Pick an embedding size for `n` depending on `classes` if not given in `sz_dict`."
      sz_dict = ifnone(sz_dict, {})
      n_cat = len(classes[n])
      sz = sz_dict.get(n, int(emb_sz_rule(n_cat)))  # rule of thumb
      return n_cat,sz
docs: Pick an embedding size for `n` depending on `classes` if not given in `sz_dict`.