code: def run_configure(self, mandatory=True):
          
          if not has_file(self.working_dir, 'configure'):
              if mandatory:
                  raise FileNotFoundError(
                      "Could not find a configure script for execution.")
              else:
                  return
          try:
              prog = RunningProgram(self, 'configure')
              prog.expect_exit_status(0)
          except Exception:
              if mandatory:
                  raise
docs: Runs the 'configure' program in the working directory.
  
          Args:
              mandatory (bool): Throw exception if 'configure' fails or a
                                'configure' file is missing.