<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def equivalent_diameter(target, pore_volume='pore.volume', pore_shape='sphere'):
 r""" Calculates the diameter of a sphere or edge-length of a cube with same volume as the pore. Parameters target : OpenPNM Geometry Object The Geometry object which this model is associated with. This controls the length of the calculated array, and also provides access to other necessary geometric properties. pore_volume : string The dictionary key containing the pore volume values pore_shape : string The shape of the pore body to assume when back-calculating from volume. Options are 'sphere' (default) or 'cube'. """

    from scipy.special import cbrt
    pore_vols = target[pore_volume]
    if pore_shape.startswith('sph'):
        value = cbrt(6*pore_vols/_np.pi)
    elif pore_shape.startswith('cub'):
        value = cbrt(pore_vols)
    return value