code: def has_all_nonzero_segment_lengths(neuron, threshold=0.0):
      '''Check presence of neuron segments with length not above threshold
  
      Arguments:
          neuron(Neuron): The neuron object to test
          threshold(float): value above which a segment length is considered to
          be non-zero
  
      Returns:
          CheckResult with result including list of (section_id, segment_id)
          of zero length segments
      '''
      bad_ids = []
      for sec in _nf.iter_sections(neuron):
          p = sec.points
          for i, s in enumerate(zip(p[:-1], p[1:])):
              if segment_length(s) <= threshold:
                  bad_ids.append((sec.id, i))
  
      return CheckResult(len(bad_ids) == 0, bad_idsf has_all_nonzero_segment_lengths(neuron, threshold=0.0):
      '''Check presence of neuron segments with length not above threshold
  
      Arguments:
          neuron(Neuron): The neuron object to test
          threshold(float): value above which a segment length is considered to
          be non-zero
  
      Returns:
          CheckResult with result including list of (section_id, segment_id)
          of zero length segments
      '''
      bad_ids = []
      for sec in _nf.iter_sections(neuron):
          p = sec.points
          for i, s in enumerate(zip(p[:-1], p[1:])):
              if segment_length(s) <= threshold:
                  bad_ids.append((sec.id, i))
  
      return CheckResult(len(bad_ids) == 0, bad_ids)
docs: Check presence of neuron segments with length not above threshold
  
      Arguments:
          neuron(Neuron): The neuron object to test
          threshold(float): value above which a segment length is considered to
          be non-zero
  
      Returns:
          CheckResult with result including list of (section_id, segment_id)
          of zero length segments