code: def open(self):
          
  
          if not self._is_connected:
              
              print("Connecting to arduino on {}... ".format(self.device),end="")
  
              self.comm = serial.Serial()
              self.comm.port = self.device
              self.comm.baudrate = self.baud_rate
              self.comm.timeout = self.timeout
              self.dtr = self.enable_dtr
              self.comm.open()
  
              time.sleep(self.settle_time)
              self._is_connected = True
  
              print("done.")
docs: Open the serial connection.