code: def check_pdseries_table(obj, return_metadata=False, var_name="obj"):
      metadata = dict()
  
      if not isinstance(obj, pd.Series):
          msg = f"{var_name} must be a pandas.Series, found {type(obj)}"
          return _ret(False, msg, None, return_metadata)
  
      # we now know obj is a pd.Series
      index = obj.index
      if _req("is_empty", return_metadata):
          metadata["is_empty"] = len(index) < 1
      if _req("is_univariate", return_metadata):
          metadata["is_univariate"] = True
      if _req("n_instances", return_metadata):
          metadata["n_instances"] = len(index)
  
      # check whether index is equally spaced or if there are any nans
      #   compute only if needed
      if _req("has_nans", return_metadata):
          metadata["has_nans"] = obj.isna().values.any()
  
      return _ret(True, None, metadata, return_metadata)
  
imports: import numpy
  import pandas
  from sktime.datatypes._common import _req, _ret
label_desc: Use image node_id 2 for calling a global function with example usage: check_pdseries_table(obj, return_metadata, var_name) and returns: _ret, _ret