code: def raise_for_none(cls, v):
      if v is None:
          raise ValueError("None / null is not allowed")
      return v
  
imports: import inspect
  import re
  from collections import defaultdict
  from enum import Enum
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional, Tuple, Type, TypeVar, Union
  from thinc.api import ConfigValidationError, Model, Optimizer
  from thinc.config import Promise
  from .attrs import NAMES
  from .compat import Literal
  from .lookups import Lookups
  from .util import is_cython_func
label_desc: Use image node_id 1 for calling the TokenPatternString obj's underlying member method code with example usage: obj.raise_for_none(cls, v) and returns: v