code: def _compare_timestamps_on_attributes(
      ts_1: pd.Timestamp, ts_2: pd.Timestamp, required_matches: set
  ) -> bool:
      """Compares pd.Timestamp instances on attributes.
  
      Compares two timestamps according two a given set of attributes (such as minute, hour, day, etc.).
      It returns True if and only if the two timestamps are matching in all given attributes.
  
      Parameters
      ----------
      ts_1
          First timestamp that will be compared.
      ts_2
          Second timestamp that will be compared.
      required_matches
          A set of pd.Timestamp attributes which ts_1 and ts_2 will be checked on.
  
      Returns
      -------
      bool
          True if and only if `ts_1` and `ts_2` match in all attributes given in `required_matches`.
      """
      return all(
          map(
              lambda attr: getattr(ts_1, attr) == getattr(ts_2, attr),
              required_matches,
          )
      )
  
imports: from typing import Callable, Optional
  import numpy
  import pandas
  from statsmodels.tsa.stattools import acf
  from darts.logging import get_logger
  from darts.models.forecasting.forecasting_model import LocalForecastingModel
  from darts.timeseries import TimeSeries
  from darts.utils.missing_values import fill_missing_values
label_desc: Use image node_id 3 for calling a global function with example usage: _compare_timestamps_on_attributes(ts_1, ts_2, required_matches) and returns: all