':type name: str
:type line_number: int'

def add_import(self, name, line_number):

    import_name = name
    while (len(name) > len('ansible.module_utils.')):
        if (name in self.module_utils):
            if (name not in self.imports):
                display.info(('%s:%d    imports    module_utils:    %s' % (self.path, line_number, name)), verbosity=5)
                self.imports.add(name)
            return
        name = '.'.join(name.split('.')[:(-1)])
    if self.path.startswith('test/'):
        return
    display.warning(('%s:%d    Invalid    module_utils    import:    %s' % (self.path, line_number, import_name)))
