code: def fetch_movie_sentiment(
      return_X_y: bool = False, url_id: int = 0
  ) -> Union[Bunch, Tuple[list, list]]:
      """
      The movie review dataset, equally split between negative and positive reviews.
  
      Parameters
      ----------
      return_X_y
          If ``True``, return features `X` and labels `y` as `Python` lists. If ``False`` return a `Bunch` object.
      url_id
          Index specifying which URL to use for downloading
  
      Returns
      -------
      Bunch
          Movie reviews and sentiment labels (0 means 'negative' and 1 means 'positive').
      (data, target)
          Tuple if ``return_X_y=True``.
      """
      url = MOVIESENTIMENT_URLS[url_id]
      try:
          resp = requests.get(url, timeout=2)
          resp.raise_for_status()
      except RequestException:
          logger.exception(
              "Could not connect, URL may be out of service"
          )
          raise
  
      tar = tarfile.open(fileobj=BytesIO(resp.content), mode="r:gz")
      data = []
      labels = []
      for i, member in enumerate(tar.getnames()[1:]):
          f = tar.extractfile(member)
          for line in f.readlines():  # type: ignore[union-attr]
              try:
                  line.decode("utf8")
              except UnicodeDecodeError:
                  continue
              data.append(line.decode("utf8").strip())
              labels.append(i)
      tar.close()
      if return_X_y:
          return data, labels
  
      target_names = ["negative", "positive"]
      return Bunch(data=data, target=labels, target_names=target_names)
  
file_path: alibi/alibi/datasets/default.py
imports: import logging
  import pkgutil
  import tarfile
  import json
  from io import BytesIO, StringIO
  from typing import Optional, Tuple, Union, Dict
  import numpy
  import pandas
  import PIL
  import requests
  from requests import RequestException
  from sklearn.preprocessing import LabelEncoder
  from alibi.utils.data import Bunch
label_desc: Use image node_id 4 for calling a global function with example usage: fetch_movie_sentiment(return_X_y, url_id) and returns: Bunch, data,  labels