class_docstr: Random number generator base class used by bound module functions.
  
  Used to instantiate instances of Random to get generators that don't
  share state.
  
  Class Random can also be subclassed if you want to use a different basic
  generator of your own devising: in that case, override the following
  methods:  random(), seed(), getstate(), and setstate().
  Optionally, implement a getrandbits() method so that randrange()
  can cover arbitrarily large ranges.
class_docstr_tok: ["Random","number","generator","base","class","used","by","bound","module","functions",".","Used","to","instantiate","instances","of","Random","to","get","generators","that","don't","share","state",".","Class","Random","can","also","be","subclassed","if","you","want","to","use","a","different","basic","generator","of","your","own","devising",":","in","that","case",",","override","the","following","methods",":","random","(",")",",","seed","(",")",",","getstate","(",")",",","and","setstate","(",")",".","Optionally",",","implement","a","getrandbits","(",")","method","so","that","randrange","(",")","can","cover","arbitrarily","large","ranges","."]
docstr: Choose a random item from range(stop) or range(start, stop[, step]).
  
  Roughly equivalent to ``choice(range(start, stop, step))`` but
  supports arbitrarily large ranges and is optimized for common cases.
docstr_tok: ["Choose","a","random","item","from","range","(","stop",")","or","range","(","start",",","stop","[",",","step","]",")",".","Roughly","equivalent","to","``","choice","(","range","(","start",",","stop",",","step",")",")","``","but","supports","arbitrarily","large","ranges","and","is","optimized","for","common","cases","."]
code: def randrange(self, start, stop=None, step=_ONE):
      """Choose a random item from range(stop) or range(start, stop[, step]).
  
      Roughly equivalent to ``choice(range(start, stop, step))`` but
      supports arbitrarily large ranges and is optimized for common cases.
  
      """
  
      # This code is a bit messy to make it fast for the
      # common case while still doing adequate error checking.
      try:
          istart = _index(start)
      except TypeError:
          istart = int(start)
          if istart != start:
              _warn(
                  "randrange() will raise TypeError in the future",
                  DeprecationWarning,
                  2,
              )
              raise ValueError("non-integer arg 1 for randrange()")
          _warn(
              "non-integer arguments to randrange() have been deprecated "
              "since Python 3.10 and will be removed in a subsequent "
              "version",
              DeprecationWarning,
              2,
          )
      if stop is None:
          # We don't check for "step != 1" because it hasn't been
          # type checked and converted to an integer yet.
          if step is not _ONE:
              raise TypeError("Missing a non-None stop argument")
          if istart > 0:
              return self._randbelow(istart)
          raise ValueError("empty range for randrange()")
  
      # stop argument supplied.
      try:
          istop = _index(stop)
      except TypeError:
          istop = int(stop)
          if istop != stop:
              _warn(
                  "randrange() will raise TypeError in the future",
                  DeprecationWarning,
                  2,
              )
              raise ValueError("non-integer stop for randrange()")
          _warn(
              "non-integer arguments to randrange() have been deprecated "
              "since Python 3.10 and will be removed in a subsequent "
              "version",
              DeprecationWarning,
              2,
          )
      width = istop - istart
      try:
          istep = _index(step)
      except TypeError:
          istep = int(step)
          if istep != step:
              _warn(
                  "randrange() will raise TypeError in the future",
                  DeprecationWarning,
                  2,
              )
              raise ValueError("non-integer step for randrange()")
          _warn(
              "non-integer arguments to randrange() have been deprecated "
              "since Python 3.10 and will be removed in a subsequent "
              "version",
              DeprecationWarning,
              2,
          )
      # Fast path.
      if istep == 1:
          if width > 0:
              return istart + self._randbelow(width)
          raise ValueError(
              "empty range for randrange() (%d, %d, %d)"
              % (istart, istop, width)
          )
  
      # Non-unit step argument supplied.
      if istep > 0:
          n = (width + istep - 1) // istep
      elif istep < 0:
          n = (width + istep + 1) // istep
      else:
          raise ValueError("zero step for randrange()")
      if n <= 0:
          raise ValueError("empty range for randrange()")
      return istart + istep * self._randbelow(n)
  
imports: from warnings import warn
  from math import log, exp, pi, e, ceil
  from math import sqrt, acos, cos, sin
  from math import tau, floor, isfinite
  from os import urandom
  from _collections_abc import Set, Sequence
  from operator import index
  from itertools import accumulate, repeat
  from bisect import bisect
  import os
  import _random
label_desc: Use image node_id 12 for calling the Random obj's underlying member method code with example usage: obj.randrange(start, stop, step) and returns: unknown, self, unknown