code: def pyside_load_ui(uifile, base_instance=None):
      
      form_class, base_class = load_ui_type(uifile)
      if not base_instance:
          typeName = form_class.__name__
          finalType = type(typeName,
                           (form_class, base_class),
                           {})
          base_instance = finalType()
      else:
          if not isinstance(base_instance, base_class):
              raise RuntimeError(
                  'The base_instance passed to loadUi does not inherit from'
                  ' needed base type (%s)' % type(base_class))
          typeName = type(base_instance).__name__
          base_instance.__class__ = type(typeName,
                                         (form_class, type(base_instance)),
                                         {})
      base_instance.setupUi(base_instance)
      return base_instance
docs: Provide PyQt4.uic.loadUi functionality to PySide
  
      Args:
          uifile (str): Absolute path to .ui file
          base_instance (QWidget): The widget into which UI widgets are loaded
  
  
      Note:
          pysideuic is required for this to work with PySide.
  
          This seems to work correctly in Maya as well as outside of it as
          opposed to other implementations which involve overriding QUiLoader.
  
      Returns:
          QWidget: the base instance