code: def _time_reduce(self, arr, reduction):
          
          if self.dtype_in_time == 'av' or not self.def_time:
              return arr
          reductions = {
              'ts': lambda xarr: xarr,
              'av': lambda xarr: xarr.mean(internal_names.YEAR_STR),
              'std': lambda xarr: xarr.std(internal_names.YEAR_STR),
              }
          try:
              return reductions[reduction](arr)
          except KeyError:
              raise ValueError("Specified time-reduction method '{}' is not "
                               "supported".format(reduction))
docs: Perform the specified time reduction on a local time-series.