code: def _coerce_to_series(obj):
      """Coerce to pd.Series, from polymorphic input scalar or pandas."""
      if isinstance(obj, pd.DataFrame):
          assert len(obj.columns) == 1
          return obj.iloc[:, 0]
      elif isinstance(obj, pd.Series):
          return obj
      else:
          return pd.Series(obj)
  
imports: import pandas
label_desc: Use image node_id 3 for calling a global function with example usage: _coerce_to_series(obj) and returns: obj, obj, pd