class_docstr: This is a [defaultdict]
  (https://docs.python.org/2/library/collections.html#collections.defaultdict) where the
  default value is dependent on the key that is passed.
  
  We use "namespaces" in the :class:`Vocabulary` object to keep track of several different
  mappings from strings to integers, so that we have a consistent API for mapping words, tags,
  labels, characters, or whatever else you want, into integers.  The issue is that some of those
  namespaces (words and characters) should have integers reserved for padding and
  out-of-vocabulary tokens, while others (labels and tags) shouldn't.  This class allows you to
  specify filters on the namespace (the key used in the `defaultdict`), and use different
  default values depending on whether the namespace passes the filter.
  
  To do filtering, we take a set of `non_padded_namespaces`.  This is a set of strings
  that are either matched exactly against the keys, or treated as suffixes, if the
  string starts with `*`.  In other words, if `*tags` is in `non_padded_namespaces` then
  `passage_tags`, `question_tags`, etc. (anything that ends with `tags`) will have the
  `non_padded` default value.
  
  # Parameters
  
  non_padded_namespaces : `Iterable[str]`
      A set / list / tuple of strings describing which namespaces are not padded.  If a namespace
      (key) is missing from this dictionary, we will use :func:`namespace_match` to see whether
      the namespace should be padded.  If the given namespace matches any of the strings in this
      list, we will use `non_padded_function` to initialize the value for that namespace, and
      we will use `padded_function` otherwise.
  padded_function : `Callable[[], Any]`
      A zero-argument function to call to initialize a value for a namespace that `should` be
      padded.
  non_padded_function : `Callable[[], Any]`
      A zero-argument function to call to initialize a value for a namespace that should `not` be
      padded.
class_docstr_tok: ["This","is","a","[","defaultdict","]","(","https",":","\/\/docs.python.org\/2\/library\/collections.html","#","collections.defaultdict",")","where","the","default","value","is","dependent","on","the","key","that","is","passed",".","We","use","``","namespaces","''","in","the",":","class",":","`","Vocabulary","`","object","to","keep","track","of","several","different","mappings","from","strings","to","integers",",","so","that","we","have","a","consistent","API","for","mapping","words",",","tags",",","labels",",","characters",",","or","whatever","else","you","want",",","into","integers",".","The","issue","is","that","some","of","those","namespaces","(","words","and","characters",")","should","have","integers","reserved","for","padding","and","out-of-vocabulary","tokens",",","while","others","(","labels","and","tags",")","should","n't",".","This","class","allows","you","to","specify","filters","on","the","namespace","(","the","key","used","in","the","`","defaultdict","`",")",",","and","use","different","default","values","depending","on","whether","the","namespace","passes","the","filter",".","To","do","filtering",",","we","take","a","set","of","`","non_padded_namespaces","`",".","This","is","a","set","of","strings","that","are","either","matched","exactly","against","the","keys",",","or","treated","as","suffixes",",","if","the","string","starts","with","`","*","`",".","In","other","words",",","if","`","*","tags","`","is","in","`","non_padded_namespaces","`","then","`","passage_tags","`",",","`","question_tags","`",",","etc",".","(","anything","that","ends","with","`","tags","`",")","will","have","the","`","non_padded","`","default","value",".","#","Parameters","non_padded_namespaces",":","`","Iterable","[","str","]","`","A","set","\/","list","\/","tuple","of","strings","describing","which","namespaces","are","not","padded",".","If","a","namespace","(","key",")","is","missing","from","this","dictionary",",","we","will","use",":","func",":","`","namespace_match","`","to","see","whether","the","namespace","should","be","padded",".","If","the","given","namespace","matches","any","of","the","strings","in","this","list",",","we","will","use","`","non_padded_function","`","to","initialize","the","value","for","that","namespace",",","and","we","will","use","`","padded_function","`","otherwise",".","padded_function",":","`","Callable","[","[","]",",","Any","]","`","A","zero-argument","function","to","call","to","initialize","a","value","for","a","namespace","that","`","should","`","be","padded",".","non_padded_function",":","`","Callable","[","[","]",",","Any","]","`","A","zero-argument","function","to","call","to","initialize","a","value","for","a","namespace","that","should","`","not","`","be","padded","."]
code: def add_non_padded_namespaces(self, non_padded_namespaces: Set[str]):
      # add non_padded_namespaces which weren't already present
      self._non_padded_namespaces.update(non_padded_namespaces)
  
imports: import codecs
  import copy
  import logging
  import os
  import re
  from collections import defaultdict
  from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Union, TYPE_CHECKING
  from transformers import PreTrainedTokenizer
  from allennlp.common import Registrable
  from allennlp.common.file_utils import cached_path, FileLock
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.tqdm import Tqdm
  from allennlp.common.util import namespace_match
label_desc: Use image node_id 3 for calling the _NamespaceDependentDefaultDict obj's underlying member method code with example usage: obj.add_non_padded_namespaces(non_padded_namespaces) without return types