def _close_callable(self, node, force=False):
        try:
            lineno = node.lineno
        except AttributeError:
            return
        if lineno <= self._processed_line:
            return
        # code =
        name = ""
        try:
            name = (
                node.name
                if hasattr(node, "name")
                else (
                    node.targets[0].id
                    if hasattr(node.targets[0], "id")
                    else node.targets[0].value.id
                )
            )
        except AttributeError:
            pass
        indent = self._get_indent(node)
        count = -1
        # code =
        dlist = []
        while count >= -len(self._indent_stack):
            element_full_name = self._indent_stack[count]["full_name"]
            edict = self._callables_db.get(element_full_name, None)
            stack_indent = self._indent_stack[count]["level"]
            open_callable = element_full_name and (not edict["last_lineno"])
            # code =
            if open_callable and (
                force
                or (indent < stack_indent)
                or (
                    (indent == stack_indent)
                    and (
                        (edict["type"] != "prop")
                        or (
                            (edict["type"] == "prop")
                            and (name and (name != element_full_name))
                        )
                    )
                )
            ):
                # code =
                edict["last_lineno"] = lineno - 1
                dlist.append(count)
            if indent > stack_indent:
                break
            count -= 1
        stack = self._indent_stack
        stack_length = len(self._indent_stack)
        dlist = [item for item in dlist if stack[item]["type"] != "module"]
        for item in dlist:
            del self._indent_stack[stack_length + item]