def credentials_are_valid(self, user_settings, client):
        if user_settings:
            client = client or GitHubClient(external_account=user_settings.external_accounts[0])
            try:
                client.user()
            except (GitHubError, __HOLE__):
                return False
        return True
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/github/serializer.py/GitHubSerializer.credentials_are_valid