code: func (a *Agent) ResponseMID(ctx context.Context, mid uint, v interface{}, isError ...bool) error {
  	err := false
  	if len(isError) > 0 {
  		err = isError[0]
  	}
  	if a.GetStatus() == constants.StatusClosed {
  		err := constants.ErrBrokenPipe
  		tracing.FinishSpan(ctx, err)
  		metrics.ReportTimingFromCtx(ctx, a.metricsReporters, handlerType, err)
  		return err
  	}
  
  	if mid <= 0 {
  		err := constants.ErrSessionOnNotify
  		tracing.FinishSpan(ctx, err)
  		metrics.ReportTimingFromCtx(ctx, a.metricsReporters, handlerType, err)
  		return err
  	}
  
  	switch d := v.(type) {
  	case []byte:
  		logger.Log.Debugf("Type=Response, ID=%d, UID=%d, MID=%d, Data=%dbytes",
  			a.Session.ID(), a.Session.UID(), mid, len(d))
  	default:
  		logger.Log.Infof("Type=Response, ID=%d, UID=%d, MID=%d, Data=%+v",
  			a.Session.ID(), a.Session.UID(), mid, v)
  	}
  
  	return a.send(pendingMessage{ctx: ctx, typ: message.Response, mid: mid, payload: v, err: err})
  }
docs: // ResponseMID implementation for session.NetworkEntity interface
  // Respond message to session