class_docstr: Find orbit polynomial for a given timestamp.
class_docstr_tok: ["Find","orbit","polynomial","for","a","given","timestamp","."]
docstr: Find interval closest to the given timestamp within a given distance.
  
  Args:
      time: Timestamp of interest
      threshold: Maximum distance between timestamp and interval center
  
  Returns:
      Index of closest interval
docstr_tok: ["Find","interval","closest","to","the","given","timestamp","within","a","given","distance",".","Args",":","time",":","Timestamp","of","interest","threshold",":","Maximum","distance","between","timestamp","and","interval","center","Returns",":","Index","of","closest","interval"]
code: def _get_closest_interval_within(self, time, threshold):
      """Find interval closest to the given timestamp within a given distance.
  
      Args:
          time: Timestamp of interest
          threshold: Maximum distance between timestamp and interval center
  
      Returns:
          Index of closest interval
      """
      closest_match, distance = self._get_closest_interval(time)
      threshold_diff = np.timedelta64(threshold, "h")
      if distance < threshold_diff:
          return closest_match
      raise NoValidOrbitParams(
          "Unable to find orbit coefficients valid for {} +/- {}"
          "hours".format(time, threshold)
      )
  
imports: from __future__ import annotations
  import warnings
  from datetime import datetime, timedelta
  import dask.array
  import numpy
  import pyproj
  from numpy.polynomial.chebyshev import Chebyshev
  from satpy.readers.eum_base import issue_revision, time_cds_short
  from satpy.readers.utils import apply_earthsun_distance_correction
  from satpy.utils import get_legacy_chunk_size
label_desc: Use image node_id 4 for calling the OrbitPolynomialFinder obj's underlying member method code with example usage: obj._get_closest_interval_within(time, threshold) and returns: closest_match