class_docstr: This is where tuners and assessors are not defined yet.
  Inherits this class to make your own advisor.
  
  .. note::
  
      The class inheriting MsgDispatcherBase should be instantiated
      after nnimanager (rest server) is started, so that the object
      is ready to use right after its instantiation.
class_docstr_tok: ["This","is","where","tuners","and","assessors","are","not","defined","yet",".","Inherits","this","class","to","make","your","own","advisor",".","..","note",":",":","The","class","inheriting","MsgDispatcherBase","should","be","instantiated","after","nnimanager","(","rest","server",")","is","started",",","so","that","the","object","is","ready","to","use","right","after","its","instantiation","."]
docstr: The message dispatcher is demanded to generate ``data`` trial jobs.
  These trial jobs should be sent via ``send(CommandType.NewTrialJob, nni.dump(parameter))``,
  where ``parameter`` will be received by NNI Manager and eventually accessible to trial jobs as "next parameter".
  Semantically, message dispatcher should do this ``send`` exactly ``data`` times.
  
  The JSON sent by this method should follow the format of
  
  ::
  
      {
          "parameter_id": 42
          "parameters": {
              // this will be received by trial
          },
          "parameter_source": "algorithm" // optional
      }
  
  Parameters
  ----------
  data: int
      number of trial jobs
docstr_tok: ["The","message","dispatcher","is","demanded","to","generate","``","data","``","trial","jobs",".","These","trial","jobs","should","be","sent","via","``","send","(","CommandType.NewTrialJob",",","nni.dump","(","parameter",")",")","``",",","where","``","parameter","``","will","be","received","by","NNI","Manager","and","eventually","accessible","to","trial","jobs","as","``","next","parameter","''",".","Semantically",",","message","dispatcher","should","do","this","``","send","``","exactly","``","data","``","times",".","The","JSON","sent","by","this","method","should","follow","the","format","of",":",":","{","``","parameter_id","''",":","42","``","parameters","''",":","{","\/\/","this","will","be","received","by","trial","}",",","``","parameter_source","''",":","``","algorithm","''","\/\/","optional","}","Parameters","--","--","--","--","--","data",":","int","number","of","trial","jobs"]
code: def handle_request_trial_jobs(self, data):
      """The message dispatcher is demanded to generate ``data`` trial jobs.
      These trial jobs should be sent via ``send(CommandType.NewTrialJob, nni.dump(parameter))``,
      where ``parameter`` will be received by NNI Manager and eventually accessible to trial jobs as "next parameter".
      Semantically, message dispatcher should do this ``send`` exactly ``data`` times.
  
      The JSON sent by this method should follow the format of
  
      ::
  
          {
              "parameter_id": 42
              "parameters": {
                  // this will be received by trial
              },
              "parameter_source": "algorithm" // optional
          }
  
      Parameters
      ----------
      data: int
          number of trial jobs
      """
      raise NotImplementedError(
          "handle_request_trial_jobs not implemented"
      )
  
imports: import threading
  import logging
  from queue import Queue, Empty
  from .env_vars import dispatcher_env_vars
  from ..common import load
  from ..recoverable import Recoverable
  from .tuner_command_channel import CommandType, TunerCommandChannel
label_desc: Use image node_id 10 for calling the MsgDispatcherBase obj's underlying member method code with example usage: obj.handle_request_trial_jobs(data) without return types