code: def mu_legibility_index(doc: Doc) -> float:
      """
      Readability test for Spanish-language texts based on number of words and
      the mean and variance of their lengths in characters, whose value is in the range
      [0, 100].
  
      Higher value => easier text.
  
      Args:
          doc
  
      References:
          Muñoz, M., and J. Muñoz. "Legibilidad Mµ." Viña del Mar: CHL (2006).
      """
      if doc.lang_ != "es":
          LOGGER.warning(
              "doc lang = '%s', but this readability statistic is intended for use on "
              "'es'-language texts only",
              doc.lang_,
          )
      n_chars_per_word = basics.n_chars_per_word(doc)
      n_words = len(n_chars_per_word)
      if n_words < 2:
          LOGGER.warning(
              "mu legibility index is undefined for texts with fewer than two words; "
              "returning 0.0"
          )
          return 0.0
      return (
          100
          * (n_words / (n_words - 1))
          * (
              statistics.mean(n_chars_per_word)
              / statistics.variance(n_chars_per_word)
          )
      )
  
file_path: textacy/src/textacy/text_stats/readability.py
imports: import logging
  import math
  import statistics
  from typing import Optional
  from spacy.tokens import Doc
  from ..None import errors
  from .None import basics, utils
label_desc: Use image node_id 9 for calling a global function with example usage: mu_legibility_index(doc) and returns: unknown, int