class_docstr: Defines a policy to temporally resample a time series at a specified  granularity. Note that while this transform
  does support inversion, the recovered time series may differ from the input due to information loss when resampling.
class_docstr_tok: ["Defines","a","policy","to","temporally","resample","a","time","series","at","a","specified","granularity",".","Note","that","while","this","transform","does","support","inversion",",","the","recovered","time","series","may","differ","from","the","input","due","to","information","loss","when","resampling","."]
code: def __call__(self, time_series: TimeSeries) -> TimeSeries:
      if self.granularity is None:
          logger.warning(
              f"Skipping resampling step because granularity is "
              f"None. Please either specify a granularity or train "
              f"this transformation on a time series."
          )
          return time_series
  
      return time_series.align(
          alignment_policy=AlignPolicy.FixedGranularity,
          granularity=self.granularity,
          origin=self.origin,
          remove_non_overlapping=self.remove_non_overlapping,
          aggregation_policy=self.aggregation_policy,
          missing_value_policy=self.missing_value_policy,
      )
  
imports: from collections import OrderedDict
  import logging
  from typing import Union
  import numpy
  from merlion.transform.base import TransformBase, InvertibleTransformBase
  from merlion.utils import UnivariateTimeSeries, TimeSeries
  from merlion.utils.resample import infer_granularity, granularity_str_to_seconds, AlignPolicy, AggregationPolicy, MissingValuePolicy
label_desc: Use image node_id 11 for calling the TemporalResample obj's underlying member method code with example usage: obj.__call__(time_series) and returns: time_series, time_series