code: def owl_to_model(fname):
      
      io_class = autoclass('org.biopax.paxtools.io.SimpleIOHandler')
      io = io_class(autoclass('org.biopax.paxtools.model.BioPAXLevel').L3)
  
      try:
          file_is = autoclass('java.io.FileInputStream')(fname)
      except JavaException:
          logger.error('Could not open data file %s' % fname)
          return
      try:
          biopax_model = io.convertFromOWL(file_is)
      except JavaException as e:
          logger.error('Could not convert data file %s to BioPax model' % fname)
          logger.error(e)
          return
  
      file_is.close()
  
      return biopax_model
docs: Return a BioPAX model object from an OWL file.
  
      Parameters
      ----------
      fname : str
          The name of the OWL file containing the model.
  
      Returns
      -------
      biopax_model : org.biopax.paxtools.model.Model
          A BioPAX model object (java object).