code: def as_dict(self):
          
          if self.has_omp:
              raise NotImplementedError('as_dict method of QueueAdapter not yet implemented when OpenMP is activated')
          return {'@module': self.__class__.__module__,
                  '@class': self.__class__.__name__,
                  'priority': self.priority,
                  'hardware': self.hw.as_dict(),
                  'queue': {'qtype': self.QTYPE,
                            'qname': self._qname,
                            'qnodes': self.qnodes,
                            'qparams': self._qparams},
                  'limits': {'timelimit_hard': self._timelimit_hard,
                             'timelimit': self._timelimit,
                             'min_cores': self.min_cores,
                             'max_cores': self.max_cores,
                             'min_mem_per_proc': self.min_mem_per_proc,
                             'max_mem_per_proc': self.max_mem_per_proc,
                             'memory_policy': self.memory_policy
                             },
                  'job': {},
                  'mpi_procs': self._mpi_procs,
                  'mem_per_proc': self._mem_per_proc,
                  'master_mem_overhead': self._master_mem_overhead
                  }
docs: Provides a simple though not complete dict serialization of the object (OMP missing, not all limits are
          kept in the dictionary, ... other things to be checked)
  
          Raise:
              `ValueError` if errors.