

class Backend(object):
    
    def log(self, level, message):
        self.router.log(level, message)

    def start(self):
        raise NotImplementedError
    
    def stop(self):
        raise NotImplementedError
    
    def send(self):
        raise NotImplementedError
    
    def receive(self):
        raise NotImplementedError


class Backend(object):
    def __init__ (self, router):
        self.router = router
    
    def log(self, level, message):
        self.router.log(level, message)

    def start(self):
        raise NotImplementedError
    
    def stop(self):
        raise NotImplementedError
    
    def send(self):
        raise NotImplementedError
    
    def receive(self):
        raise NotImplementedError

Add a constructor method for Backend
Add a constructor method for Backend

- 
  
  class Backend(object):
+     def __init__ (self, router):
+         self.router = router
      
      def log(self, level, message):
          self.router.log(level, message)
  
      def start(self):
          raise NotImplementedError
      
      def stop(self):
          raise NotImplementedError
      
      def send(self):
          raise NotImplementedError
      
      def receive(self):
          raise NotImplementedError
  
Add a constructor method for Backend
## Code Before:


class Backend(object):
    
    def log(self, level, message):
        self.router.log(level, message)

    def start(self):
        raise NotImplementedError
    
    def stop(self):
        raise NotImplementedError
    
    def send(self):
        raise NotImplementedError
    
    def receive(self):
        raise NotImplementedError

## Instruction:
Add a constructor method for Backend
## Code After:

class Backend(object):
    def __init__ (self, router):
        self.router = router
    
    def log(self, level, message):
        self.router.log(level, message)

    def start(self):
        raise NotImplementedError
    
    def stop(self):
        raise NotImplementedError
    
    def send(self):
        raise NotImplementedError
    
    def receive(self):
        raise NotImplementedError
