docs: def produce(self, context_ms=None):
          """ Exploration (see the `Explauto introduction <about.html>`__ for more detail):
  
          * Choose a value x on expl_dims according to the interest model
          * Infer a value y on inf_dims from x using the :meth:`~explauto.agent.agent.Agent.infer` method
          * Extract the motor m and sensory s parts of x, y
          * generate a movement from m
  
          :returns: the generated movement
  
          .. note:: This correspond to motor babbling if expl_dims=self.conf.m_dims and inf_dims=self.conf.s_dims and to  goal babbling if expl_dims=self.conf.s_dims and inf_dims=self.conf.m_dims.
          """
          if context_ms is None:
              self.x = self.choose()
              self.y = self.infer(self.expl_dims, self.inf_dims, self.x)
          else:
              if self.context_mode["mode"] == 'mdmsds':
                  self.x = self.choose(context_ms) 
                  if self.expl_dims == self.conf.s_dims and not self.context_mode['choose_m']:
                      m = context_ms[:self.conf.m_ndims//2]
                      in_dims = range(self.conf.m_ndims//2) + range(self.conf.m_ndims, self.conf.m_ndims + self.conf.s_ndims)
                      out_dims = range(self.conf.m_ndims//2, self.conf.m_ndims)
                      dm = self.infer(in_dims, 
                                      out_dims, 
                                      np.array(m + list(self.x)))
                      self.y = np.hstack((m, dm))
                  else:
                      self.y = self.infer(self.expl_dims, self.inf_dims, self.x)
              elif self.context_mode["mode"] == 'mcs':
                  self.x = self.choose(context_ms) 
                  self.y = self.infer(self.expl_dims, self.inf_dims, self.x)
                  
  
          self.m, self.s = self.extract_ms(self.x, self.y)
  
          movement = self.motor_primitive(self.m)
  
          self.emit('choice', self.x)
          self.emit('inference', self.y)
          self.emit('movement', movement)
  
          return movement