<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def straight_throat(target, throat_centroid='throat.centroid', throat_vector='throat.vector', throat_length='throat.length'):
 r""" Calculate the coordinates of throat endpoints given a central coordinate, unit vector along the throat direction and a length. 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_centroid : string Dictionary key of the throat center coordinates. throat_vector : string Dictionary key of the throat vector pointing along the length of the throats. throat_length : string Dictionary key of the throat length. Returns ------- EP : dictionary Coordinates of throat endpoints stored in Dict form. Can be accessed via the dict keys 'head' and 'tail'. """

    network = target.project.network
    throats = network.map_throats(throats=target.Ts, origin=target)
    center = network[throat_centroid][throats]
    vector = network[throat_vector][throats]
    length = network[throat_length][throats]
    EP1 = center - 0.5 * length[:, _sp.newaxis] * vector
    EP2 = center + 0.5 * length[:, _sp.newaxis] * vector
    return {'head': EP1, 'tail': EP2}