<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_neighbor_throats(target, throat_prop='throat.seed', mode='min'):
 r""" Adopt a value from the values found in neighboring throats Parameters target : OpenPNM Object The object which this model is associated with. This controls the length of the calculated array, and also provides access to other necessary properties. throat_prop : string The dictionary key of the array containing the throat property to be used in the calculation. The default is 'throat.seed'. mode : string Controls how the pore property is calculated. Options are 'min', 'max' and 'mean'. """

    prj = target.project
    network = prj.network
    lookup = prj.find_full_domain(target)
    Ps = lookup.map_pores(target.pores(), target)
    data = lookup[throat_prop]
    neighborTs = network.find_neighbor_throats(pores=Ps,
                                               flatten=False,
                                               mode='or')
    values = np.ones((np.shape(Ps)[0],))*np.nan
    if mode == 'min':
        for pore in range(len(Ps)):
            values[pore] = np.amin(data[neighborTs[pore]])
    if mode == 'max':
        for pore in range(len(Ps)):
            values[pore] = np.amax(data[neighborTs[pore]])
    if mode == 'mean':
        for pore in range(len(Ps)):
            values[pore] = np.mean(data[neighborTs[pore]])
    return values