code: def drop_missing_y_vals(df, y, output_column=None):
      y = list(y)
      indices_to_drop = []
      indices_to_keep = []
      for idx, val in enumerate(y):
          if not isinstance(val, str):
              if (
                  isinstance(val, numbers.Number)
                  or val is None
                  or isinstance(val, np.generic)
              ):
                  val = str(val)
              else:
                  val = val.encode("utf-8").decode("utf-8")
  
          if val in bad_vals_as_strings:
              indices_to_drop.append(idx)
  
      if len(indices_to_drop) > 0:
          set_of_indices_to_drop = set(indices_to_drop)
  
          print(
              "We encountered a number of missing values for this output column"
          )
          if output_column is not None:
              print(output_column)
          print(
              "And here is the number of missing (nan, None, etc.) values for this column:"
          )
          print(len(indices_to_drop))
          print("Here are some example missing values")
          for idx, df_idx in enumerate(indices_to_drop):
              if idx >= 5:
                  break
              print(y[df_idx])
          print(
              "We will remove these values, and continue with training on the cleaned dataset"
          )
  
          support_mask = [
              True if idx not in set_of_indices_to_drop else False
              for idx in range(df.shape[0])
          ]
          if isinstance(df, pd.DataFrame):
              df.drop(df.index[indices_to_drop], axis=0, inplace=True)
              # df = df.loc[support_mask,]
          elif scipy.sparse.issparse(df):
              df = delete_rows_csr(df, indices_to_drop)
          elif isinstance(df, np.ndarray):
              df = np.delete(df, indices_to_drop, axis=0)
          y = [
              val
              for idx, val in enumerate(y)
              if idx not in set_of_indices_to_drop
          ]
  
      return df, y
  
imports: import csv
  import datetime
  import numbers
  import os
  import pkg_resources
  import numpy
  import pandas
  import scipy
  from sklearn.datasets import load_boston
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import LabelEncoder
  from sklearn.utils.metaestimators import if_delegate_has_method
  from sklearn.utils import column_or_1d
  from auto_ml._version import __version__
label_desc: Use image node_id 8 for calling a global function with example usage: drop_missing_y_vals(df, y, output_column) and returns: df,  y