class_docstr: Note: most parameters has default dummy value,
        which is convenient when used in script.
        please pass in custom implements as you wish
class_docstr_tok: ["Note",":","most","parameters","has","default","dummy","value",",","which","is","convenient","when","used","in","script",".","please","pass","in","custom","implements","as","you","wish"]
docstr: create contexes with namespaces indexed from 0 to end(excluded)
docstr_tok: ["create","contexes","with","namespaces","indexed","from","0","to","end","(","excluded",")"]
code: def ctxs_range(
      self, *args, **kwargs
  ) -> Iterable[Tuple[int, "Context"]]:
      """
      create contexes with namespaces indexed from 0 to end(excluded)
      """
  
      if "start" in kwargs:
          start = kwargs["start"]
          if "end" not in kwargs:
              raise ValueError("End value must be provided")
          end = kwargs["end"]
          if len(args) > 0:
              raise ValueError("Too many arguments")
      else:
          if "end" in kwargs:
              end = kwargs["end"]
              if len(args) > 1:
                  raise ValueError("Too many arguments")
              elif len(args) == 0:
                  raise ValueError("Start value must be provided")
              else:
                  start = args[0]
          else:
              if len(args) == 1:
                  start, end = 0, args[0]
              elif len(args) == 2:
                  start, end = args
              else:
                  raise ValueError("Too few arguments")
  
      for i in range(start, end):
          yield i, self.with_namespace(
              self._namespace.indexed_ns(index=i)
          )
  
imports: import logging
  import typing
  from typing import Iterable, Literal, Optional, Tuple, TypeVar, overload
  from fate.arch.trace import auto_trace
  from ._cipher import CipherKit
  from ._metrics import InMemoryMetricsHandler, MetricsWrap
  from ._namespace import NS, default_ns
  from ._parties import Parties, Party
  from ..unify import device
label_desc: Use image node_id 19 for calling the Context obj's underlying member method code with example usage: obj.ctxs_range() without return types