code: def visit_If(self, node):
      if node.test not in self.static_expressions:
          return self.generic_visit(node)
  
      imported_ids = self.gather(ImportedIds, node)
  
      assigned_ids_left = self.escaping_ids(node, node.body)
      assigned_ids_right = self.escaping_ids(node, node.orelse)
      assigned_ids_both = assigned_ids_left.union(assigned_ids_right)
  
      imported_ids.update(
          i for i in assigned_ids_left if i not in assigned_ids_right
      )
      imported_ids.update(
          i for i in assigned_ids_right if i not in assigned_ids_left
      )
      imported_ids = sorted(imported_ids)
  
      assigned_ids = sorted(assigned_ids_both)
  
      fbody = self.make_fake(node.body)
      true_has_return = self.gather(HasReturn, fbody)
      true_has_break = self.gather(HasBreak, fbody)
      true_has_cont = self.gather(HasContinue, fbody)
  
      felse = self.make_fake(node.orelse)
      false_has_return = self.gather(HasReturn, felse)
      false_has_break = self.gather(HasBreak, felse)
      false_has_cont = self.gather(HasContinue, felse)
  
      has_return = true_has_return or false_has_return
      has_break = true_has_break or false_has_break
      has_cont = true_has_cont or false_has_cont
  
      self.generic_visit(node)
  
      func_true = outline(
          self.true_name(),
          imported_ids,
          assigned_ids,
          node.body,
          has_return,
          has_break,
          has_cont,
      )
      func_false = outline(
          self.false_name(),
          imported_ids,
          assigned_ids,
          node.orelse,
          has_return,
          has_break,
          has_cont,
      )
      self.new_functions.extend((func_true, func_false))
  
      actual_call = self.make_dispatcher(
          node.test, func_true, func_false, imported_ids
      )
  
      # variable modified within the static_if
      expected_return = [
          ast.Name(ii, ast.Store(), None, None) for ii in assigned_ids
      ]
  
      self.update = True
  
      # name for various variables resulting from the static_if
      n = len(self.new_functions)
      status_n = "$status{}".format(n)
      return_n = "$return{}".format(n)
      cont_n = "$cont{}".format(n)
  
      if has_return:
          cfg = self.cfgs[-1]
          always_return = all(
              isinstance(x, (ast.Return, ast.Yield)) for x in cfg[node]
          )
          always_return &= true_has_return and false_has_return
  
          fast_return = [
              ast.Name(status_n, ast.Store(), None, None),
              ast.Name(return_n, ast.Store(), None, None),
              ast.Name(cont_n, ast.Store(), None, None),
          ]
  
          if always_return:
              return [
                  ast.Assign(
                      [ast.Tuple(fast_return, ast.Store())],
                      actual_call,
                      None,
                  ),
                  ast.Return(
                      ast.Name(return_n, ast.Load(), None, None)
                  ),
              ]
          else:
              cont_ass = self.make_control_flow_handlers(
                  cont_n, status_n, expected_return, has_cont, has_break
              )
  
              cmpr = ast.Compare(
                  ast.Name(status_n, ast.Load(), None, None),
                  [ast.Eq()],
                  [ast.Constant(EARLY_RET, None)],
              )
              return [
                  ast.Assign(
                      [ast.Tuple(fast_return, ast.Store())],
                      actual_call,
                      None,
                  ),
                  ast.If(
                      cmpr,
                      [
                          ast.Return(
                              ast.Name(return_n, ast.Load(), None, None)
                          )
                      ],
                      cont_ass,
                  ),
              ]
      elif has_break or has_cont:
          cont_ass = self.make_control_flow_handlers(
              cont_n, status_n, expected_return, has_cont, has_break
          )
  
          fast_return = [
              ast.Name(status_n, ast.Store(), None, None),
              ast.Name(cont_n, ast.Store(), None, None),
          ]
          return [
              ast.Assign(
                  [ast.Tuple(fast_return, ast.Store())],
                  actual_call,
                  None,
              )
          ] + cont_ass
      elif expected_return:
          return ast.Assign(
              [ast.Tuple(expected_return, ast.Store())],
              actual_call,
              None,
          )
      else:
          return ast.Expr(actual_call)
  
imports: from pythran.analyses import ImportedIds, HasReturn, IsAssigned, CFG, HasBreak, HasContinue, DefUseChains, Ancestors, StaticExpressions, HasStaticExpression
  from pythran.passmanager import Transformation
  from pythran.syntax import PythranSyntaxError
  import gast
  from copy import deepcopy
label_desc: Use image node_id 11 for calling the NormalizeStaticIf obj's underlying member method code with example usage: obj.visit_If(node) and returns: self, list, list, unknown, ast, ast