code: def get_the_board(
      layout=BOARDS["arduino"], base_dir="/dev/", identifier="tty.usbserial"
  ):
      
      from .pyfirmata import Board  # prevent a circular import
  
      boards = []
      for device in os.listdir(base_dir):
          if device.startswith(identifier):
              try:
                  board = Board(os.path.join(base_dir, device), layout)
              except serial.SerialException:
                  pass
              else:
                  boards.append(board)
      if len(boards) == 0:
          raise IOError(
              "No boards found in {0} with identifier {1}".format(base_dir, identifier)
          )
      elif len(boards) > 1:
          raise IOError("More than one board found!")
      return boards[0]
docs: Helper function to get the one and only board connected to the computer
      running this. It assumes a normal arduino layout, but this can be
      overriden by passing a different layout dict as the ``layout`` parameter.
      ``base_dir`` and ``identifier`` are overridable as well. It will raise an
      IOError if it can't find a board, on a serial, or if it finds more than
      one.