import tempfile


def create_staging_directory(parent_dir=None):
    """Creates a temporary staging directory at the specified location.
       If no `parent_dir` is specified, the platform-specific "temp" directory is used.
    """
    return tempfile.mkdtemp(prefix="staging_", dir=parent_dir)