code: def load_longley(y_name="TOTEMP"):
      """Load the Longley dataset for forecasting with exogenous variables.
  
      Parameters
      ----------
      y_name: str, optional (default="TOTEMP")
          Name of target variable (y)
  
      Returns
      -------
      y: pd.Series
          The target series to be predicted.
      X: pd.DataFrame
          The exogenous time series data for the problem.
  
      Examples
      --------
      >>> from sktime.datasets import load_longley
      >>> y, X = load_longley()
  
      Notes
      -----
      This mulitvariate time series dataset contains various US macroeconomic
      variables from 1947 to 1962 that are known to be highly collinear.
  
      Dimensionality:     multivariate, 6
      Series length:      16
      Frequency:          Yearly
      Number of cases:    1
  
      Variable description:
  
      TOTEMP - Total employment
      GNPDEFL - Gross national product deflator
      GNP - Gross national product
      UNEMP - Number of unemployed
      ARMED - Size of armed forces
      POP - Population
  
      References
      ----------
      .. [1] Longley, J.W. (1967) "An Appraisal of Least Squares Programs for the
          Electronic Computer from the Point of View of the User."  Journal of
          the American Statistical Association.  62.319, 819-41.
          (https://www.itl.nist.gov/div898/strd/lls/data/LINKS/DATA/Longley.dat)
      """
      name = "Longley"
      fname = name + ".csv"
      path = os.path.join(MODULE, DIRNAME, name, fname)
      data = pd.read_csv(path, index_col=0)
      data = data.set_index("YEAR")
      data.index = pd.PeriodIndex(data.index, freq="Y", name="Period")
      data = data.astype(float)
  
      # Get target series
      y = data.pop(y_name)
      return y, data
  
imports: import os
  import zipfile
  from urllib.error import HTTPError, URLError
  from warnings import warn
  import numpy
  import pandas
  from sktime.datasets._data_io import _download_and_extract, _list_available_datasets, _load_dataset, _load_provided_dataset
  from sktime.datasets._readers_writers.tsf import load_tsf_to_dataframe
  from sktime.datasets.tsf_dataset_names import tsf_all, tsf_all_datasets
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 13 for calling a global function with example usage: load_longley(y_name) and returns: y,  data