def mkdir(self):
        if getattr(self, 'cache_isdir', None):
            return

        self.parent.mkdir()

        if self.name:
            try:
                os.mkdir(self.abspath())
            except OSError:
                e = extract_exception()
                if e.errno != errno.EEXIST:
                    raise

            if not os.path.isdir(self.abspath()):
                raise IOError('%s is not a directory' % self)

            try:
                self.children
            except:
                self.children = {}

        self.cache_isdir = True
write a directory for the node
dataset/ETHPy150Open cournape/Bento/bento/core/node.py/Node.mkdir