class_docstr: Tests `_get_feature_times` function defined in `darts.utils.data.tabularization`. There
  are broadly two 'groups' of tests defined in this module:
      1. 'Generated Test Cases': these test that `_get_feature_times` produces the same outputs
      as a simplified implementation of this same function. For these tests, the 'correct answer' is not
      directly specified; instead, it is generated from a set of input parameters using the set of simplified
      functions. The rationale behind this approach is that it allows for many different combinations of input
      values to be effortlessly tested. The drawback of this, however, is that the correctness of these tests
      assumes that the simplified functions have been implemented correctly - if this isn't the case, then these
      tests are not to be trusted. In saying this, these simplified functions are significantly easier to
      understand and debug than the `create_lagged_prediction_data` function they're helping to test.
      2. 'Specified Test Cases': these test that `_get_feature_times` returns an exactly specified output; these
      specified outputs are *not* 'generated' by another function. Although these 'specified' test cases tend to
      be simpler and less extensive than the 'generated' test cases, their correctness does not assume the correct
      implementation of any other function.
docstr: Helper function that returns all the times within `target_series` that can be used to
  create features and labels for training.
  
  More specifically:
      - The first `max_lag = -min(lags)` times are excluded, since these times
      have fewer than `max_lag` values after them, which means that we can't create
      features for these times.
      - The last `output_chunk_length - 1` times are excluded, since these times don't
      have `(output_chunk_length - 1)` values ahead of them and, therefore, we can't
      create labels for these times.
docstr_tok: ["Helper","function","that","returns","all","the","times","within","`","target_series","`","that","can","be","used","to","create","features","and","labels","for","training",".","More","specifically",":","-","The","first","`","max_lag","=","-min","(","lags",")","`","times","are","excluded",",","since","these","times","have","fewer","than","`","max_lag","`","values","after","them",",","which","means","that","we","ca","n't","create","features","for","these","times",".","-","The","last","`","output_chunk_length","-","1","`","times","are","excluded",",","since","these","times","don't","have","`","(","output_chunk_length","-","1",")","`","values","ahead","of","them","and",",","therefore",",","we","can't","create","labels","for","these","times","."]
code: def get_feature_times_target_training(
      target_series: TimeSeries,
      lags: Sequence[int],
      output_chunk_length: int,
  ):
      """
      Helper function that returns all the times within `target_series` that can be used to
      create features and labels for training.
  
      More specifically:
          - The first `max_lag = -min(lags)` times are excluded, since these times
          have fewer than `max_lag` values after them, which means that we can't create
          features for these times.
          - The last `output_chunk_length - 1` times are excluded, since these times don't
          have `(output_chunk_length - 1)` values ahead of them and, therefore, we can't
          create labels for these times.
      """
      times = target_series.time_index
      # Exclude first `max_lag` times:
      max_lag = -min(lags)
      times = times[max_lag:]
      # Exclude last `output_chunk_length - 1` times:
      if output_chunk_length > 1:
          times = times[: -output_chunk_length + 1]
      return times
  
imports: import warnings
  from itertools import product
  from typing import Sequence
  import pandas
  import pytest
  from darts import TimeSeries
  from darts.logging import get_logger, raise_log
  from darts.utils.data.tabularization import _get_feature_times
  from darts.utils.timeseries_generation import linear_timeseries
label_desc: Use image node_id 1 for calling the TestGetFeatureTimes obj's underlying member method code with example usage: obj.get_feature_times_target_training(target_series, lags, output_chunk_length) and returns: times