code: def num_masked_values(target) -> float:
      """
      Count number of masked values in target
      """
      if np.ma.isMaskedArray(target):
          return np.ma.count_masked(target)
      else:
          return 0
  
file_path: gluonts/src/gluonts/evaluation/metrics.py
imports: from typing import Optional
  import numpy
  from gluonts.time_feature import get_seasonality
label_desc: Use image node_id 12 for calling a global function with example usage: num_masked_values(target) and returns: np, int