code: def get_value_len(value):
      '''
      Get length of ``value``. If ``value`` (eg, iterator) has no len(), convert it to list first.
  
      return both length and converted value.
      '''
      try:
          Nvalue = len(value)
      except TypeError:
          # convert iterator/generator to list
          value = list(value)
          Nvalue = len(value)
      return Nvalue, valuf get_value_len(value):
      '''
      Get length of ``value``. If ``value`` (eg, iterator) has no len(), convert it to list first.
  
      return both length and converted value.
      '''
      try:
          Nvalue = len(value)
      except TypeError:
          # convert iterator/generator to list
          value = list(value)
          Nvalue = len(value)
      return Nvalue, value
docs: Get length of ``value``. If ``value`` (eg, iterator) has no len(), convert it to list first.
  
      return both length and converted value.