def METHOD_NAME(self, secret_key, provider_id):
    """
    Compare signature we received with the signature we expect/have.
    Throw an error if they don't match.
    """
    data = self.initial_data
    actual_signature = data["signature"]
    # Accounts for old way of storing provider key
    if isinstance(secret_key, str) and signature(data, secret_key) != actual_signature:
        msg = f'Request from credit provider [{provider_id}] had an invalid signature.'
        raise PermissionDenied(msg)
    # Accounts for new way of storing provider key
    if isinstance(secret_key, list):
        # Received value just needs to match one of the keys we have
        key_match = False
        for secretvalue in secret_key:
            if signature(data, secretvalue) == actual_signature:
                key_match = True
        if not key_match:
            msg = f'Request from credit provider [{provider_id}] had an invalid signature.'
            raise PermissionDenied(msg)