code: def _validate_X(X):
      if isinstance(X, list):
          if len(X) == 1:
              return X[0]  # Make X a string
          else:
              raise ValueError(
                  "A list of multiple text inputs is not supported yet."
              )
      elif not isinstance(X, str):
          raise ValueError(
              "Invalid input, str or list input expected, received {}".format(
                  type(X)
              )
          )
      return X
  
file_path: interpret-text/python/interpret_text/experimental/common/base_explainer.py
imports: from abc import abstractmethod, ABC
  from typing import Optional, Any, Iterable
  from interpret_text.experimental.common.base_text_model import BaseTextModel
  from interpret_text.experimental.common.preprocessor.base_text_preprocessor import BaseTextPreprocessor
  from interpret_text.experimental.explanation import LocalExplanation
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_X(X) and returns: X, X