class_docstr: The UnsupervisedSampler is responsible for sampling walks in the given graph
  and returning positive and negative samples w.r.t. those walks, on demand.
  
  The positive samples are all the (target, context) pairs from the walks and the negative
  samples are contexts generated for each target based on a sampling distribution.
  
  By default, a UniformRandomWalk is used, but a custom `walker` can be specified instead. An
  error will be raised if other parameters are specified along with a custom `walker`.
  
  .. seealso::
  
     Examples using this sampler:
  
     - Attri2Vec: `node classification <https://stellargraph.readthedocs.io/en/stable/demos/node-classification/attri2vec-node-classification.html>`__ `link prediction <https://stellargraph.readthedocs.io/en/stable/demos/link-prediction/attri2vec-link-prediction.html>`__, `unsupervised representation learning <https://stellargraph.readthedocs.io/en/stable/demos/embeddings/attri2vec-embeddings.html>`__
     - GraphSAGE: `unsupervised representation learning <https://stellargraph.readthedocs.io/en/stable/demos/embeddings/graphsage-unsupervised-sampler-embeddings.html>`__
     - Node2Vec: `node classification <https://stellargraph.readthedocs.io/en/stable/demos/node-classification/keras-node2vec-node-classification.html>`__, `unsupervised representation learning <https://stellargraph.readthedocs.io/en/stable/demos/embeddings/keras-node2vec-embeddings.html>`__
     - `comparison of link prediction algorithms <https://stellargraph.readthedocs.io/en/stable/demos/link-prediction/homogeneous-comparison-link-prediction.html>`__
  
     Built-in classes for ``walker``: :class:`.UniformRandomWalk`, :class:`.BiasedRandomWalk`, :class:`.UniformRandomMetaPathWalk`.
  
  Args:
      G (StellarGraph): A stellargraph with features.
      nodes (iterable, optional) The root nodes from which individual walks start.
          If not provided, all nodes in the graph are used.
      length (int): Length of the walks for the default UniformRandomWalk walker. Length must
          be at least 2.
      number_of_walks (int): Number of walks from each root node for the default
          UniformRandomWalk walker.
      seed (int, optional): Random seed for the default UniformRandomWalk walker.
      walker (RandomWalk, optional): A RandomWalk object to use instead of the default
          UniformRandomWalk walker.
docstr: Checks that the parameter values are valid or raises ValueError exceptions with a message indicating the
  parameter (the first one encountered in the checks) with invalid value.
  
  Args:
      batch_size: <int> number of samples to generate in each call of generator
code: def _check_parameter_values(self, batch_size):
      """
      Checks that the parameter values are valid or raises ValueError exceptions with a message indicating the
      parameter (the first one encountered in the checks) with invalid value.
  
      Args:
          batch_size: <int> number of samples to generate in each call of generator
  
      """
  
      if (
          batch_size is None
      ):  # must provide a batch size since this is an indicator of how many samples to return
          raise ValueError(
              "({}) The batch_size must be provided to generate samples for each batch in the epoch".format(
                  type(self).__name__
              )
          )
  
      if type(batch_size) != int:  # must be an integer
          raise TypeError(
              "({}) The batch_size must be positive integer.".format(
                  type(self).__name__
              )
          )
  
      if batch_size < 1:  # must be greater than 0
          raise ValueError(
              "({}) The batch_size must be positive integer.".format(
                  type(self).__name__
              )
          )
  
      if (
          batch_size % 2 != 0
      ):  # should be even since we generate 1 negative sample for each positive one.
          raise ValueError(
              "({}) The batch_size must be an even integer since equal number of positive and negative samples are generated in each batch.".format(
                  type(self).__name__
              )
          )
  
file_path: stellargraph/stellargraph/data/unsupervised_sampler.py
imports: import numpy
  from stellargraph.core.utils import is_real_iterable
  from stellargraph.core.graph import StellarGraph
  from stellargraph.data.explorer import UniformRandomWalk
  from stellargraph.random import random_state
label_desc: Use image node_id 3 for calling the UnsupervisedSampler obj's underlying member method code with example usage: obj._check_parameter_values(batch_size) without return types