code: public static <T> T readObjectFromFile(String path, Class<T> type, JavaSparkContext sc) throws IOException {
          return readObjectFromFile(path, type, sc.sc());
      }
docs: Read an object from HDFS (or local) using default Java object serialization
  
  @param path    File to read
  @param type    Class of the object to read
  @param sc      Spark context
  @param <T>     Type of the object to read