def METHOD_NAME(d: np.ndarray) -> np.ndarray:
    """Computes Autodock Vina's hydrogen bond interaction term.
    Here, d is the set of surface distances as defined in [1]_
    Parameters
    ----------
    d: np.ndarray
        A numpy array of shape `(N, M)`.
    Returns
    -------
    np.ndarray
        A `(N, M)` array of hydrophoboic interactions in a piecewise linear curve.
    References
    ----------
    .. [1] Jain, Ajay N. "Scoring noncovalent protein-ligand interactions:
        a continuous differentiable function tuned to compute binding affinities."
        Journal of computer-aided molecular design 10.5 (1996): 427-440.
    """
    out_tensor = np.where(
        d < -0.7, np.ones_like(d),
        np.where(d < 0, (1.0 / 0.7) * (0 - d), np.zeros_like(d)))
    return out_tensor