<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def barnes_point(sq_dist, values, kappa, gamma=None):
 r"""Generate a single pass barnes interpolation value for a point. The calculated value is based on the given distances, kappa and gamma values. Parameters sq_dist: (N, ) ndarray Squared distance between observations and grid point values: (N, ) ndarray Observation values in same order as sq_dist kappa: float Response parameter for barnes interpolation. gamma: float Adjustable smoothing parameter for the barnes interpolation. Default 1. Returns ------- value: float Interpolation value for grid point. """

    if gamma is None:
        gamma = 1
    weights = tools.barnes_weights(sq_dist, kappa, gamma)
    total_weights = np.sum(weights)

    return sum(v * (w / total_weights) for (w, v) in zip(weights, values))