def create_home_dir(self, home_path=None):
    if home_path is None:
      home_path = self.get_home_dir()

    mode = int(HOME_DIR_PERMISSIONS.get(), 8)
    if not self.exists(home_path):
      user = self.user
      try:
        try:
          self.setuser(self.superuser)
          self.mkdir(home_path)
          self.chmod(home_path, mode)
          self.chown(home_path, user, user)
        except __HOLE__:
          msg = 'Failed to create home dir ("%s") as superuser %s' % (home_path, self.superuser)
          LOG.exception(msg)
          raise
      finally:
        self.setuser(user)
dataset/ETHPy150Open cloudera/hue/desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py/Hdfs.create_home_dir