code: def mkdir(self, directory, exists_okay=False):
          
          # Execute os.mkdir command on the board.
          command = """
              try:
                  import os
              except ImportError:
                  import uos as os
              os.mkdir('{0}')
          """.format(
              directory
          )
          self._pyboard.enter_raw_repl()
          try:
              out = self._pyboard.exec_(textwrap.dedent(command))
          except PyboardError as ex:
              # Check if this is an OSError #17, i.e. directory already exists.
              if ex.args[2].decode("utf-8").find("OSError: [Errno 17] EEXIST") != -1:
                  if not exists_okay:
                      raise DirectoryExistsError(
                          "Directory already exists: {0}".format(directory)
                      )
              else:
                  raise ex
          self._pyboard.exit_raw_repl()
docs: Create the specified directory.  Note this cannot create a recursive
          hierarchy of directories, instead each one should be created separately.