class_docstr: RedisTimeSeries Commands.
class_docstr_tok: ["RedisTimeSeries","Commands","."]
docstr: Append labels behavior to params.
docstr_tok: ["Append","labels","behavior","to","params","."]
code: def _append_with_labels(
      params: List[str],
      with_labels: Optional[bool],
      select_labels: Optional[List[str]],
  ):
      """Append labels behavior to params."""
      if with_labels and select_labels:
          raise DataError(
              "with_labels and select_labels cannot be provided together."
          )
  
      if with_labels:
          params.extend(["WITHLABELS"])
      if select_labels:
          params.extend(["SELECTED_LABELS", *select_labels])
  
imports: from typing import Dict, List, Optional, Tuple, Union
  from redis.exceptions import DataError
  from redis.typing import KeyT, Number
label_desc: Use image node_id 21 for calling the TimeSeriesCommands obj's underlying member method code with example usage: obj._append_with_labels(params, with_labels, select_labels) without return types