docs: def _load_profile_imports(self, symbol_table):
      """
      profile_imports is a list of module names or tuples
      of (module_name, names to import)
      in the form of ('.', names) it behaces like:
      from . import name1, name2, name3
      or similarly
      import .name1, .name2, .name3
  
      i.e. "name" in names becomes ".name"
      """
      results = []
      if 'profile_imports' not in symbol_table:
        return results
  
      package = self._get_package(symbol_table)
      profile_imports = symbol_table['profile_imports']
  
      for item in profile_imports:
        if isinstance(item, str):
          # import the whole module
          module_name, names = (item, None)
        else:
          # expecting a 2 items tuple or list
          # import only the names from the module
          module_name, names = item
  
        if '.' in module_name and len(set(module_name)) == 1  and names is not None:
          # if you execute `from . import mod` from a module in the pkg package
          # then you will end up importing pkg.mod
          module_names = [f'{module_name}{name}' for name in names]
          names = None
        else:
          module_names = [module_name]
  
        for module_name in module_names:
          module = importlib.import_module(module_name, package=package)
          if names is None:
            results.append(module)
          else:
            #  1. check if the imported module has an attribute by that name
            #  2. if not, attempt to import a submodule with that name
            #  3. if the attribute is not found, ImportError is raised.
            #  …
            for name in names:
              try:
                results.append(getattr(module, name))
              except AttributeError:
                # attempt to import a submodule with that name
                sub_module_name = '.'.join([module_name, name])
                sub_module = importlib.import_module(sub_module_name, package=package)
                results.append(sub_module)
      return results