def METHOD_NAME(args: argparse.Namespace) -> None:
    """Create vimiv cache, config and data directories.
    The directories are either the directories defined in the freedesktop
    standard or located in a temporary base directory.
    Args:
        args: Arguments returned from parser.parse_args().
    """
    if args.temp_basedir:
        global _tmpdir
        # We want the temporary directory to stick around until the end
        # pylint: disable=consider-using-with
        _tmpdir = tempfile.TemporaryDirectory(prefix="vimiv-tempdir-")
        args.basedir = _tmpdir.name
    if args.basedir is not None:
        xdg.basedir = args.basedir
    xdg.makedirs(xdg.vimiv_cache_dir(), xdg.vimiv_config_dir(), xdg.vimiv_data_dir())