code: def missing_values_ratio(series: TimeSeries) -> float:
      """
      Computes the ratio of missing values
  
      Parameters
      ----------
      series
          The time series to compute ratio on
  
      Returns
      -------
      float
          The ratio of missing values
      """
  
      return series.pd_dataframe().isnull().sum().mean() / len(series)
  
imports: from typing import List, Optional, Union
  from darts.logging import get_logger, raise_if, raise_if_not
  from darts.timeseries import TimeSeries
label_desc: Use image node_id 1 for calling a global function with example usage: missing_values_ratio(series) and returns: unknown