code: def _require_without_generator(value, name):
      if value is not None:
          return value
      else:
          raise ValueError(
              f"{name}: expected a value for 'input_neighbor_tree', 'n_samples', 'input_dim', and "
              f"'multiplicity' when 'generator' is not provided, found {name}=None."
          )
  
imports: import tensorflow
  from tensorflow.keras.layers import Layer
  from tensorflow.keras import backend, Input
  from tensorflow.keras.layers import Lambda, Dropout, Reshape
  from tensorflow.keras.utils import Sequence
  from tensorflow.keras import activations, initializers, regularizers, constraints
  from typing import List, Callable, Tuple, Dict, Union, AnyStr
  import itertools
  import operator
  import warnings
  from .misc import deprecated_model_function
  from ..mapper import HinSAGENodeGenerator, HinSAGELinkGenerator
label_desc: Use image node_id 1 for calling a global function with example usage: _require_without_generator(value, name) and returns: value