code: def segment_radial_dist(seg, pos):
      '''Return the radial distance of a tree segment to a given point
  
      The radial distance is the euclidian distance between the mid-point of
      the segment and the point in question.
  
      Parameters:
          seg: tree segment
  
          pos: origin to which distances are measured. It must have at lease 3
          components. The first 3 components are (x, y, z).
      '''
      return point_dist(pos, np.divide(np.add(seg[0], seg[1]), 2.0)f segment_radial_dist(seg, pos):
      '''Return the radial distance of a tree segment to a given point
  
      The radial distance is the euclidian distance between the mid-point of
      the segment and the point in question.
  
      Parameters:
          seg: tree segment
  
          pos: origin to which distances are measured. It must have at lease 3
          components. The first 3 components are (x, y, z).
      '''
      return point_dist(pos, np.divide(np.add(seg[0], seg[1]), 2.0))
docs: Return the radial distance of a tree segment to a given point
  
      The radial distance is the euclidian distance between the mid-point of
      the segment and the point in question.
  
      Parameters:
          seg: tree segment
  
          pos: origin to which distances are measured. It must have at lease 3
          components. The first 3 components are (x, y, z).