@classmethod
def generate_is_role_functions(cls, roles):
    """
        Generate `class.is_{role}()` methods for a class.

        :param class cls: The python class to be modified.
        :param dict roles: The roles to use for generation.

        This method is intended to be used by an inheriting class to
        generate `is_{role}()` methods based on the roles provided
        during generation.

        :class:`FlaskKeystone` uses this to add these methods to a dynamically
        generated class which inherits from this class.
        """
    for access_role in roles.keys():
        is_role_func = cls.generate_is_role_function(access_role)
        setattr(cls, 'is_' + access_role, is_role_func)
