def METHOD_NAME(temp_dir):
    """Create a temporary file of a particular size (1024 bytes)."""
    filename = os.path.join(temp_dir.name, "file")
    with open(filename, "wb") as f:
        f.write(b"*" * 1024)
    return filename