def METHOD_NAME(self):
    """The serializer should not be valid if the key is not of a valid format."""
    invalid_uuids = (
        "a2f27fdz-973a-4e89-8dca-cc59e01d255c",
        "a2f27fde9-73a-4e89-8dca-cc59e01d255c",
        "a2f27fde-973a4-e89-8dca-cc59e01d255c",
        "a2f27fde-973a-4e89-8dc-ccc59e01d255c",
        "a2f27fde-973a-4e89-8dca-cc59e01d255",
        "a2f27fde973a4e898dcacc59e01d255c",
    )
    invalid_keys = (
        [f"{u}/video/{uuid4()}/0123456789" for u in invalid_uuids]
        + [f"{uuid4()}/video/{u}/0123456789" for u in invalid_uuids]
        + [
            f"{uuid4()}/pideos/{uuid4()}/0123456789",
            f"{uuid4()}/video/{uuid4()}/012345678a",
            f"{uuid4()}/timedtexttrack/{uuid4()}/0123456789_f1",
            f"{uuid4()}/timedtexttrack/{uuid4()}/0123456789_fr_cf",
        ]
    )
    for key in invalid_keys:
        invalid_data = {
            "key": key,
            "state": "ready",
            "extraParameters": {"foo": "bar"},
        }
        serializer = UpdateStateSerializer(data=invalid_data)
        self.assertFalse(serializer.is_valid())
        self.assertEqual(
            serializer.errors["key"][0],
            "This value does not match the required pattern.",
        )