def getHomeFolder(principalId):
    """Get the home folder instance of the specified principal.

        If a assignment does not exist and `autoCreateAssignment` is set to
        `True`, then create the assignment and the homefolder. The homefolder
        will always be created regardless of the value of createHomeFolder.
        The folder will be given the same name like the principalId.

        During creation, the principal should get the rights specified in
        homeFolderRole inside the folder.

        If the home folder does not exist and `autoCreateAssignment` is set to
        `False`, then return `None`.
        """
