code: def _validate_text_data(data, metric_name, col_specifier):
      """Validates that the data is a list of strs and is non-empty"""
      if data is None or len(data) == 0:
          return False
  
      for row, line in enumerate(data):
          if not isinstance(line, str):
              _logger.warning(
                  f"Cannot calculate {metric_name} for non-string inputs. "
                  f"Non-string found for {col_specifier} on row {row}. Skipping metric logging."
              )
              return False
  
      return True
  
imports: import functools
  import logging
  import os
  import numpy
  from mlflow.metrics.base import MetricValue, standard_aggregations
label_desc: Use image node_id 2 for calling a global function with example usage: _validate_text_data(data, metric_name, col_specifier) and returns: True, False, False