class_docstr: Search commands.
docstr: Returns the execution plan for a complex query.
  
  For more information see `FT.EXPLAIN <https://redis.io/commands/ft.explain>`_.
docstr_tok: ["Returns","the","execution","plan","for","a","complex","query",".","For","more","information","see","`","FT.EXPLAIN","<","https",":","\/\/redis.io\/commands\/ft.explain",">","`","_","."]
code: def explain(
      self,
      query: Union[str, Query],
      query_params: Dict[str, Union[str, int, float]] = None,
  ):
      """Returns the execution plan for a complex query.
  
      For more information see `FT.EXPLAIN <https://redis.io/commands/ft.explain>`_.
      """  # noqa
      args, query_text = self._mk_query_args(
          query, query_params=query_params
      )
      return self.execute_command(EXPLAIN_CMD, *args)
  
imports: import itertools
  import time
  from typing import Dict, List, Optional, Union
  from redis.client import Pipeline
  from redis.utils import deprecated_function
  from ..helpers import get_protocol_version, parse_to_dict
  from ._util import to_string
  from .aggregation import AggregateRequest, AggregateResult, Cursor
  from .document import Document
  from .query import Query
  from .result import Result
  from .suggestion import SuggestionParser
label_desc: Use image node_id 24 for calling the SearchCommands obj's underlying member method code with example usage: obj.explain(query, query_params) and returns: self