code: def _len_iter(obj):
      '''Length (hint) of an iterator.
      '''
      n = getattr(obj, '__length_hint__', None)
      if n:
         n = n()
      else:  # try len()
         n = _len(obj)
      return f _len_iter(obj):
      '''Length (hint) of an iterator.
      '''
      n = getattr(obj, '__length_hint__', None)
      if n:
         n = n()
      else:  # try len()
         n = _len(obj)
      return n
docs: Length (hint) of an iterator.