def METHOD_NAME(self,function):
    '''Inspect the inputted function and automatically generate controls by looking the defaults '''
    full_args = inspect.getargspec(function)
    self.add_checkbox('save_returned')
    self.add_lineedit('function name')
    self.controls['function name'].setText(str(function))
    self.controls['function name'].setReadOnly(True)
    if 'self' in full_args.args:
        full_args.args.remove('self')
    if (full_args.defaults != None 
            and len(full_args.args)==len(full_args.defaults)):
        for arg, default in zip(full_args.args, full_args.defaults):
            if type(default) == int:
                self.add_spinbox(arg)
                self.controls[arg].setValue(default)
            elif type(default) == float:
                self.add_doublespinbox(arg)
                self.controls[arg].setValue(default)
            elif type(default) == bool:
                self.add_checkbox(arg)
                self.controls[arg].setChecked(default)
            elif hasattr(default,'__call__'):
                self.add_lineedit(arg)
                try:
                    self.controls[arg].setText(default.__name__)
                except Exception as e:
                    print(e)
                    self.controls[arg].setText(default.__name__)
                self.controls[arg].setReadOnly(True)
            else:
                self.add_lineedit(arg)
                if type(default)==np.ndarray:
                    temp_txt = np.array2string(default).replace('   ',',') # danger - might need to check formatter
                    temp_txt = temp_txt.replace('  ',',')
                    temp_txt = temp_txt.replace(' ',',')
                    temp_txt = temp_txt.replace('[,','[')
                    temp_txt = temp_txt.replace(',]',']')
                    txt ='np.array('+temp_txt+')'
                elif type(default)==str:
                    txt= "'"+default+"'"
                else:
                    txt = str(default)
                self.controls[arg].setText(txt)
    self.add_button('start')
    self.controls['start'].pressed.connect(self.start)                