code: def mkdir_p(self, mode=0o777):
          
          try:
              self.mkdir(mode)
          except OSError:
              _, e, _ = sys.exc_info()
              if e.errno != errno.EEXIST:
                  raise
          return self
docs: Like :meth:`mkdir`, but does not raise an exception if the
          directory already exists.