def METHOD_NAME(self, src, mode):
    parser = pyverilog.vparser.parser.VerilogParser()
    ast = parser.parse(src)
    visitor = _ModuleGraphVisitor()
    visitor.visit(ast)
    for name, defn in visitor.defns.items():
        circ, default_params = self._import_defn(defn, mode)
        if mode is ImportMode.DEFINE:
            circ.verilogFile = _get_lines(src, defn.lineno, defn.end_lineno)
            circ.verilog_source = src
        circ.coreir_config_param_types = {
            k: type(v)
            for k, v in default_params.items()
        }
        circ.default_kwargs = default_params
        self.add_module(circ)