def METHOD_NAME(self, klass):
    """
    Detect whether given class directly defines itself as <module>.<klass>
    It can either be a <klass> that inherits from a test "symbol", like:
    ```class FooTest(Test)```
    Or from an <module>.<klass> symbol, like in:
    ```class FooTest(avocado.Test)```
    :type klass: :class:`_ast.ClassDef`
    :rtype: bool
    """
    # Is it inherited from Test? 'class FooTest(Test):'
    if self.klass_imports:
        base_ids = [base.id for base in klass.bases if isinstance(base, ast.Name)]
        # Looking for a 'class FooTest(Test):'
        if not self.klass_imports.isdisjoint(base_ids):
            return True
    # Is it inherited from avocado.Test? 'class FooTest(avocado.Test):'
    if self.mod_imports:
        for base in klass.bases:
            if not isinstance(base, ast.Attribute):
                # Check only 'module.Class' bases
                continue
            cls_module = base.value.id
            cls_name = base.attr
            if cls_module in self.mod_imports and cls_name == self.klass:
                return True
    return False