<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_import(self, *names):
 """ Tries to import names from the module specified on initialization of the FromOptionalDependency-object. In case an ImportError occurs, the requested names are replaced with stub objects. :param names: List of strings that are used as type names. :return: Tuple of actual symbols or stub types with provided names. If there is only one element in the tuple, that element is returned. """

        try:
            module_object = importlib.import_module(self._module)

            objects = tuple(getattr(module_object, name) for name in names)
        except ImportError:
            def failing_init(obj, *args, **kwargs):
                raise self._exception

            objects = tuple(type(name, (object,), {'__init__': failing_init})
                            for name in names)

        return objects if len(objects) != 1 else objects[0]