code: def tdist_ci(x, dof, stderr, level):
      """
      Confidence Intervals using the t-distribution
      """
      import scipy.stats as stats
  
      q = (1 + level) / 2
      if dof is None:
          delta = stats.norm.ppf(q) * stderr
      else:
          delta = stats.t.ppf(q, dof) * stderr
      return x - delta, x + delta
  
imports: from __future__ import annotations
  import warnings
  from contextlib import suppress
  from typing import TYPE_CHECKING
  import numpy
  import pandas
  from .._utils import get_valid_kwargs
  from ..exceptions import PlotnineError, PlotnineWarning
label_desc: Use image node_id 14 for calling a global function with example usage: tdist_ci(x, dof, stderr, level) and returns: unknown,  unknown