code: def _set_bin_specs_by_time_width_and_offset(
      self,
      time_width: Union[str, int, float],
      time_offset: Union[str, int, float],
  ):
      if self.time_axis in self.bin_specs:
          raise ValueError(
              f'time-axis "{self.time_axis}" already found in binning specifications.'
          )
      # convert time width and offset to nanoseconds
      self.bin_specs[self.time_axis] = {
          "bin_width": float(pd.Timedelta(time_width).value),
          "bin_offset": float(pd.Timestamp(time_offset).value),
      }
  
imports: from pathlib import Path
  from typing import Any, Dict, List, Optional, Union
  import pandas
  from histogrammar.dfinterface.make_histograms import get_time_axes
  from pydantic import BaseModel
  from pydantic_settings import BaseSettings
  from typing_extensions import Literal
label_desc: Use image node_id 4 for calling the Settings obj's underlying member method code with example usage: obj._set_bin_specs_by_time_width_and_offset(time_width, time_offset) without return types