code: def adjust_search_node_visible(
      self, node_name, keep_state=False, is_node=True
  ):
      if node_name is None:
          return
      node_names = []
      if is_node is False:
          var = self.all_vars[node_name]
          node_names.append(var["from_node"])
          node_names.extend(var["to_nodes"])
      else:
          node_names.append(node_name)
      for node_name in node_names:
          topmost_parent = None
          parent_node_name = self.all_nodes[node_name]["parent_node"]
          while parent_node_name != "/":
              if self.visible_maps[parent_node_name] is True:
                  topmost_parent = parent_node_name
              parent_node_name = self.all_nodes[parent_node_name][
                  "parent_node"
              ]
          if topmost_parent is not None:
              self.visible_maps[topmost_parent] = False
              parent_node_name = self.all_nodes[node_name][
                  "parent_node"
              ]
              if keep_state:
                  self.visible_maps[node_name] = True
                  while parent_node_name != topmost_parent:
                      self.visible_maps[parent_node_name] = False
                      parent_node_name = self.all_nodes[
                          parent_node_name
                      ]["parent_node"]
              else:
                  for child_name in self.all_nodes[parent_node_name][
                      "children_node"
                  ]:
                      self.visible_maps[child_name] = True
                  self.visible_maps[parent_node_name] = False
                  key_path_node_name = parent_node_name
                  while parent_node_name != topmost_parent:
                      parent_node_name = self.all_nodes[
                          parent_node_name
                      ]["parent_node"]
                      for child_name in self.all_nodes[
                          parent_node_name
                      ]["children_node"]:
                          if child_name != key_path_node_name:
                              self.visible_maps[child_name] = True
                          else:
                              self.visible_maps[child_name] = False
                      key_path_node_name = parent_node_name
  
imports: from collections import defaultdict
  from collections import deque
label_desc: Use image node_id 6 for calling the Model obj's underlying member method code with example usage: obj.adjust_search_node_visible(node_name, keep_state, is_node) without return types