def appropriate_for(self, usage, **kwargs):
        """
        Make sure there is a key instance present that can be used for
        the specified usage.

        :param usage: Usage specification, one of [sign, verify, decrypt,
            encrypt]
        :param kwargs: Extra keyword arguments
        :return: Suitable key or None
        """
        try:
            _use = USE[usage]
        except KeyError:
            raise ValueError('Unknown key usage')
        else:
            if usage in ['sign', 'decrypt']:
                if not self.use or _use == self.use:
                    if self.priv_key:
                        return self.priv_key
                return None
            else:  # has to be one of ['encrypt', 'verify']
                if not self.use or _use == self.use:
                    if self.pub_key:
                        return self.pub_key
                return None
Make sure there is a key instance present that can be used for
        the specified usage.

        :param usage: Usage specification, one of [sign, verify, decrypt,
            encrypt]
        :param kwargs: Extra keyword arguments
        :return: Suitable key or None