code: def _validate_curve_group(df, curve_group):
      "Validate curve group, and return inverse map."
      curve2group = {col: set() for col in df.columns}
      for ind, group in enumerate(curve_group):
          if not isinstance(
              group, (list, tuple)
          ):  # this group has a single curve
              if group in set(df.columns):
                  curve2group[group].add(ind)
              else:
                  raise ValueError(
                      "{} is not a seriers in input `ts`.".format(group)
                  )
          else:
              for curve in group:
                  if curve in set(df.columns):
                      curve2group[curve].add(ind)
                  else:
                      raise ValueError(
                          "{} is not a seriers in input `ts`.".format(
                              curve
                          )
                      )
      return curve2group
  
file_path: adtk/src/adtk/visualization/_visualization.py
imports: import matplotlib.pyplot
  import numpy
  import pandas
  from pandas.plotting import register_matplotlib_converters
  from ..data import to_events, to_labels, validate_events
label_desc: Use image node_id 2 for calling a global function with example usage: _validate_curve_group(df, curve_group) and returns: curve2group