def METHOD_NAME(pressures, T0, rock):
    """
    This calculates a geotherm based on an anchor temperature and a rock,
    assuming that the rock's temperature follows an adiabatic gradient with
    pressure. A good first guess is provided by integrating:
    .. math::
        \\frac{\partial T}{\partial P} = \\frac{ \\gamma  T}{ K_s }
    where :math:`\\gamma` is the Grueneisen parameter and :math:`K_s` is
    the adiabatic bulk modulus.
    :param pressures: The list of pressures in :math:`[Pa]` at which
        to evaluate the geotherm.
    :type pressures: list of floats
    :param T0: An anchor temperature, corresponding to the temperature of the first
        pressure in the list. :math:`[K]`
    :type T0: float
    :param rock: Composite for which we compute the adiabat.  From this material we
        must compute average Grueneisen parameters and adiabatic bulk moduli
        for each pressure/temperature.
    :type rock: :class:`burnman.composite`
    :returns: The list of temperatures for each pressure. :math:`[K]`
    :rtype: numpy.array of floats
    """
    rock.set_state(pressures[0], T0)
    S0 = rock.S
    delta_S = lambda T, P, rock, S0: S0 - rock.evaluate(["S"], [P], [T])[0]
    temperatures = np.empty_like(pressures)
    temperatures[0] = T0
    for i in range(1, len(pressures)):
        args = (pressures[i], rock, S0)
        sol = bracket(
            fn=delta_S,
            x0=(
                temperatures[i - 1]
                + (rock.gr * temperatures[i - 1] / rock.K_S)
                * (pressures[i] - pressures[i - 1])
            ),
            dx=1.0,
            args=args,
        )
        temperatures[i] = brentq(delta_S, sol[0], sol[1], args=args)
    return temperatures