code: def length_summary_vc(vc: pd.Series) -> dict:
      series = pd.Series(vc.index, index=vc)
      length = series.str.len()
      length_counts = pd.Series(length.index, index=length)
      length_counts = length_counts.groupby(level=0, sort=False).sum()
      length_counts = length_counts.sort_values(ascending=False)
  
      summary = {
          "max_length": np.max(length_counts.index),
          "mean_length": np.average(
              length_counts.index, weights=length_counts.values
          ),
          "median_length": weighted_median(
              length_counts.index.values, weights=length_counts.values
          ),
          "min_length": np.min(length_counts.index),
          "length_histogram": length_counts,
      }
  
      return summary
  
file_path: ydata-profiling/src/ydata_profiling/model/pandas/describe_categorical_pandas.py
imports: import contextlib
  import string
  from collections import Counter
  from typing import List, Tuple
  import numpy
  import pandas
  from ydata_profiling.config import Settings
  from ydata_profiling.model.pandas.imbalance_pandas import column_imbalance_score
  from ydata_profiling.model.pandas.utils_pandas import weighted_median
  from ydata_profiling.model.summary_algorithms import chi_square, describe_categorical_1d, histogram_compute, series_handle_nulls, series_hashable
label_desc: Use image node_id 6 for calling a global function with example usage: length_summary_vc(vc) and returns: summary