from pathlib import Path
import uuid


def signed_contract_random_path(instance, filename):
    """
    Use random UUID to name signed contracts
    """
    directory = instance.SIGNED_PDF_DIR
    ext = "".join(Path(filename).suffixes)
    name = uuid.uuid4()
    return f"{directory}{name}{ext}"