code: def read_arff(file_path, misplaced_list):
      misplaced = False
      for item in misplaced_list:
          if item in file_path:
              misplaced = True
  
      file = arff.load(open(file_path))
      data_value = np.asarray(file["data"])
      attributes = file["attributes"]
  
      X = data_value[:, 0:-2]
      if not misplaced:
          y = data_value[:, -1]
      else:
          y = data_value[:, -2]
      y[y == "no"] = 0
      y[y == "yes"] = 1
      y = y.astype("float").astype("int").ravel()
  
      if y.sum() > len(y):
          print(attributes)
          raise ValueError("wrong sum")
  
      return X, y, attributes
  
file_path: pyod/examples/data/mat_file_conversion.py
imports: import os
  import h5py
  import scipy
  import numpy
  import arff
  from __future__ import division
  from __future__ import print_function
  import os
  import sys
  from time import time
  import datetime
  import warnings
  import numpy
  import arff
  from sklearn.ensemble import VotingClassifier
label_desc: Use image node_id 1 for calling a global function with example usage: read_arff(file_path, misplaced_list) and returns: X,  y,  attributes