def auto_register(self, symbol_table, filter_func=None, profile_imports=None):
    """
      Register items from `symbol_table` in the profile.

      Get all items from `symbol_table` dict and from `symbol_table.profile_imports`
      if it is present. If they an item is an instance of FontBakeryCheck,
      FontBakeryCondition or FontBakeryExpectedValue and register it in
      the default section.
      If an item is a python module, try to get a profile using `get_module_profile(item)`
      and then using `merge_profile`;
      If the profile_imports kwarg is given, it is used instead of the one taken from
      the module namespace.

      To register the current module use explicitly:
        `profile.auto_register(globals())`
        OR maybe: `profile.auto_register(sys.modules[__name__].__dict__)`
      To register an imported module explicitly:
        `profile.auto_register(module.__dict__)`

      if filter_func is defined it is called like:
      filter_func(type, name_or_id, item)
      where
      type: one of "check", "module", "condition", "expected_value", "iterarg",
            "derived_iterable", "alias"
      name_or_id: the name at which the item will be registered.
            if type == 'check': the check.id
            if type == 'module': the module name (module.__name__)
      item: the item to be registered
      if filter_func returns a falsy value for an item, the item will
      not be registered.
    """
    if profile_imports:
      symbol_table = symbol_table.copy()  # Avoid messing with original table
      symbol_table['profile_imports'] = profile_imports

    all_items = list(symbol_table.values()) + self._load_profile_imports(symbol_table)
    namespace_types = (FontBakeryCondition, FontBakeryExpectedValue)
    namespace_items = []

    for item in all_items:
      if isinstance(item, namespace_types):
        # register these after all modules have been registered. That way,
        # "local" items can optionally force override items registered
        # previously by modules.
        namespace_items.append(item)
      elif isinstance(item, FontBakeryCheck):
        if filter_func and not filter_func('check', item.id, item):
          continue
        self.register_check(item)
      elif isinstance(item, types.ModuleType):
        if filter_func and not filter_func('module', item.__name__, item):
          continue
        profile = get_module_profile(item)
        if profile:
          self.merge_profile(profile, filter_func=filter_func)

    for item in namespace_items:
      if isinstance(item, FontBakeryCondition):
        if filter_func and not filter_func('condition', item.name, item):
          continue
        self.register_condition(item)
      elif isinstance(item, FontBakeryExpectedValue):
        if filter_func and not filter_func('expected_value', item.name, item):
          continue
        self.register_expected_value(item)
Register items from `symbol_table` in the profile.

      Get all items from `symbol_table` dict and from `symbol_table.profile_imports`
      if it is present. If they an item is an instance of FontBakeryCheck,
      FontBakeryCondition or FontBakeryExpectedValue and register it in
      the default section.
      If an item is a python module, try to get a profile using `get_module_profile(item)`
      and then using `merge_profile`;
      If the profile_imports kwarg is given, it is used instead of the one taken from
      the module namespace.

      To register the current module use explicitly:
        `profile.auto_register(globals())`
        OR maybe: `profile.auto_register(sys.modules[__name__].__dict__)`
      To register an imported module explicitly:
        `profile.auto_register(module.__dict__)`

      if filter_func is defined it is called like:
      filter_func(type, name_or_id, item)
      where
      type: one of "check", "module", "condition", "expected_value", "iterarg",
            "derived_iterable", "alias"
      name_or_id: the name at which the item will be registered.
            if type == 'check': the check.id
            if type == 'module': the module name (module.__name__)
      item: the item to be registered
      if filter_func returns a falsy value for an item, the item will
      not be registered.