<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_repository_url(self):
 """Verify we are not using legacy PyPI. :raises: :class:`~twine.exceptions.UploadToDeprecatedPyPIDetected` """

        repository_url = self.repository_config['repository']

        if repository_url.startswith((repository.LEGACY_PYPI,
                                      repository.LEGACY_TEST_PYPI)):
            raise exceptions.UploadToDeprecatedPyPIDetected.from_args(
                repository_url,
                utils.DEFAULT_REPOSITORY,
                utils.TEST_REPOSITORY
            )