def METHOD_NAME(m):
    e = 0.5 * m.intT
    for x in sorted(m.x):
        if x == start_x or x == end_x:
            pass
        else:
            e += 0.5 * 0.5 * dx * dt * m.omega * m.u[x, start_t] ** 2
    return e