<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _vertex_net_cost(vertex, v2n, placements, has_wrap_around_links, machine):
 """Get the total cost of the nets connected to the given vertex. Parameters vertex The vertex whose nets we're interested in. has_wrap_around_links : bool machine : :py:class:`rig.place_and_route.Machine` Returns ------- float """

    total_cost = 0.0
    for net in v2n[vertex]:
        total_cost += _net_cost(net, placements, has_wrap_around_links,
                                machine)

    return total_cost