class_docstr: Finds relevant Lightning objects in files in the file system.
  
  Attributes
  ----------
  visitor_classes: List[Type]
      List of visitor classes to use when traversing files.
  Parameters
  ----------
  path: str
      Path to file, or directory where to look for files to scan.
  glob_pattern: str
      Glob pattern to use when looking for files in the path,
      applied when path is a directory. Default is "**/*.py".
class_docstr_tok: ["Finds","relevant","Lightning","objects","in","files","in","the","file","system",".","Attributes","--","--","--","--","--","visitor_classes",":","List","[","Type","]","List","of","visitor","classes","to","use","when","traversing","files",".","Parameters","--","--","--","--","--","path",":","str","Path","to","file",",","or","directory","where","to","look","for","files","to","scan",".","glob_pattern",":","str","Glob","pattern","to","use","when","looking","for","files","in","the","path",",","applied","when","path","is","a","directory",".","Default","is","``","*","*","\/","*",".py","''","."]
code: def has_class(self, cls) -> bool:
      # This method isn't strong enough as it is using only `ImportFrom`.
      # TODO: Use proper classDef scanning.
      classes = []
  
      for path in self.paths:
          try:
              module = ast.parse(path.open().read())
          except SyntaxError:
              print(f"Error while parsing {path}: SKIPPING")
              continue
  
          for node in ast.walk(module):
              if isinstance(node, ast.ImportFrom):
                  for import_from_cls in node.names:
                      classes.append(import_from_cls.name)
  
              if isinstance(node, ast.Call):
                  cls_name = getattr(node.func, "attr", None)
                  if cls_name:
                      classes.append(cls_name)
  
      return cls.__name__ in classes
  
imports: import ast
  import inspect
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Type, Union
label_desc: Use image node_id 2 for calling the Scanner obj's underlying member method code with example usage: obj.has_class(cls) and returns: unknown