code: def t_lambda(lmbd, schedule="linear"):
      # appendix d.4
      if schedule == "linear":
          b0, b1 = 0.1, 20.0
          nom = 2 * np.logaddexp(
              -2 * lmbd, 0
          )  # numerically stable log(e**x+e**y)
          denom = (
              np.sqrt(
                  b0**2 + 2 * (b1 - b0) * np.logaddexp(-2 * lmbd, 0)
              )
              + b0
          )
          return nom / denom
      elif schedule == "cosine":
          s = 0.008
          f_lambda = -1 / 2 * np.logaddexp(-2 * lmbd, 0)
          logcos = np.log(np.cos((np.pi * s) / (2 * (1 + s))))
          return (
              2 * (1 + s) / np.pi * np.arccos(np.exp(f_lambda + logcos))
              - s
          )
  
file_path: diffusion-for-beginners/samplers/dpm_solver.py
imports: import torch
  import numpy
label_desc: Use image node_id 6 for calling the DPMSampler obj's underlying member method code with example usage: obj.t_lambda(lmbd, schedule) and returns: unknown, unknown