"""Constants relevant to ast code."""

import ast

NODE_TYPE_TO_TOKENS = {
    ast.Add: ('+',),
    ast.Sub: ('-',),
    ast.Mult: ('*',),
    ast.Div: ('/',),
    ast.Mod: ('%',),
    ast.BitAnd: ('&',),
    ast.BitOr: ('|',),
    ast.BitXor: ('^',),
    ast.FloorDiv: ('//',),
    ast.Pow: ('**',),
    ast.LShift: ('<<',),
    ast.RShift: ('>>',),
    ast.BitAnd: ('&',),
    ast.BitOr: ('|',),
    ast.BitXor: ('^',),
    ast.FloorDiv: ('//',),
    ast.Invert: ('~',),
    ast.Not: ('not',),
    ast.UAdd: ('+',),
    ast.USub: ('-',),
    ast.And: ('and',),
    ast.Or: ('or',),
    ast.Eq: ('==',),
    ast.NotEq: ('!=',),
    ast.Lt: ('<',),
    ast.LtE: ('<=',),
    ast.Gt: ('>',),
    ast.GtE: ('>=',),
    ast.Is: ('is',),
    ast.IsNot: ('is', 'not',),
    ast.In: ('in',),
    ast.NotIn: ('not', 'in',),
}


if hasattr(ast, 'MatMult'):
  NODE_TYPE_TO_TOKENS[ast.MatMult] = ('@',)

"""Constants relevant to ast code."""

import ast

NODE_TYPE_TO_TOKENS = {
    ast.Add: ('+',),
    ast.And: ('and',),
    ast.BitAnd: ('&',),
    ast.BitOr: ('|',),
    ast.BitXor: ('^',),
    ast.Div: ('/',),
    ast.Eq: ('==',),
    ast.FloorDiv: ('//',),
    ast.Gt: ('>',),
    ast.GtE: ('>=',),
    ast.In: ('in',),
    ast.Invert: ('~',),
    ast.Is: ('is',),
    ast.IsNot: ('is', 'not',),
    ast.LShift: ('<<',),
    ast.Lt: ('<',),
    ast.LtE: ('<=',),
    ast.Mod: ('%',),
    ast.Mult: ('*',),
    ast.Not: ('not',),
    ast.NotEq: ('!=',),
    ast.NotIn: ('not', 'in',),
    ast.Or: ('or',),
    ast.Pow: ('**',),
    ast.RShift: ('>>',),
    ast.Sub: ('-',),
    ast.UAdd: ('+',),
    ast.USub: ('-',),
}


if hasattr(ast, 'MatMult'):
  NODE_TYPE_TO_TOKENS[ast.MatMult] = ('@',)

Sort ast nodes in constants + remove duplicates
Sort ast nodes in constants + remove duplicates

  """Constants relevant to ast code."""
  
  import ast
  
  NODE_TYPE_TO_TOKENS = {
      ast.Add: ('+',),
-     ast.Sub: ('-',),
-     ast.Mult: ('*',),
-     ast.Div: ('/',),
-     ast.Mod: ('%',),
+     ast.And: ('and',),
      ast.BitAnd: ('&',),
      ast.BitOr: ('|',),
      ast.BitXor: ('^',),
+     ast.Div: ('/',),
+     ast.Eq: ('==',),
      ast.FloorDiv: ('//',),
+     ast.Gt: ('>',),
+     ast.GtE: ('>=',),
+     ast.In: ('in',),
+     ast.Invert: ('~',),
+     ast.Is: ('is',),
+     ast.IsNot: ('is', 'not',),
+     ast.LShift: ('<<',),
+     ast.Lt: ('<',),
+     ast.LtE: ('<=',),
+     ast.Mod: ('%',),
+     ast.Mult: ('*',),
+     ast.Not: ('not',),
+     ast.NotEq: ('!=',),
+     ast.NotIn: ('not', 'in',),
+     ast.Or: ('or',),
      ast.Pow: ('**',),
-     ast.LShift: ('<<',),
      ast.RShift: ('>>',),
-     ast.BitAnd: ('&',),
-     ast.BitOr: ('|',),
+     ast.Sub: ('-',),
-     ast.BitXor: ('^',),
-     ast.FloorDiv: ('//',),
-     ast.Invert: ('~',),
-     ast.Not: ('not',),
      ast.UAdd: ('+',),
      ast.USub: ('-',),
-     ast.And: ('and',),
-     ast.Or: ('or',),
-     ast.Eq: ('==',),
-     ast.NotEq: ('!=',),
-     ast.Lt: ('<',),
-     ast.LtE: ('<=',),
-     ast.Gt: ('>',),
-     ast.GtE: ('>=',),
-     ast.Is: ('is',),
-     ast.IsNot: ('is', 'not',),
-     ast.In: ('in',),
-     ast.NotIn: ('not', 'in',),
  }
  
  
  if hasattr(ast, 'MatMult'):
    NODE_TYPE_TO_TOKENS[ast.MatMult] = ('@',)
  
Sort ast nodes in constants + remove duplicates
## Code Before:
"""Constants relevant to ast code."""

import ast

NODE_TYPE_TO_TOKENS = {
    ast.Add: ('+',),
    ast.Sub: ('-',),
    ast.Mult: ('*',),
    ast.Div: ('/',),
    ast.Mod: ('%',),
    ast.BitAnd: ('&',),
    ast.BitOr: ('|',),
    ast.BitXor: ('^',),
    ast.FloorDiv: ('//',),
    ast.Pow: ('**',),
    ast.LShift: ('<<',),
    ast.RShift: ('>>',),
    ast.BitAnd: ('&',),
    ast.BitOr: ('|',),
    ast.BitXor: ('^',),
    ast.FloorDiv: ('//',),
    ast.Invert: ('~',),
    ast.Not: ('not',),
    ast.UAdd: ('+',),
    ast.USub: ('-',),
    ast.And: ('and',),
    ast.Or: ('or',),
    ast.Eq: ('==',),
    ast.NotEq: ('!=',),
    ast.Lt: ('<',),
    ast.LtE: ('<=',),
    ast.Gt: ('>',),
    ast.GtE: ('>=',),
    ast.Is: ('is',),
    ast.IsNot: ('is', 'not',),
    ast.In: ('in',),
    ast.NotIn: ('not', 'in',),
}


if hasattr(ast, 'MatMult'):
  NODE_TYPE_TO_TOKENS[ast.MatMult] = ('@',)

## Instruction:
Sort ast nodes in constants + remove duplicates
## Code After:
"""Constants relevant to ast code."""

import ast

NODE_TYPE_TO_TOKENS = {
    ast.Add: ('+',),
    ast.And: ('and',),
    ast.BitAnd: ('&',),
    ast.BitOr: ('|',),
    ast.BitXor: ('^',),
    ast.Div: ('/',),
    ast.Eq: ('==',),
    ast.FloorDiv: ('//',),
    ast.Gt: ('>',),
    ast.GtE: ('>=',),
    ast.In: ('in',),
    ast.Invert: ('~',),
    ast.Is: ('is',),
    ast.IsNot: ('is', 'not',),
    ast.LShift: ('<<',),
    ast.Lt: ('<',),
    ast.LtE: ('<=',),
    ast.Mod: ('%',),
    ast.Mult: ('*',),
    ast.Not: ('not',),
    ast.NotEq: ('!=',),
    ast.NotIn: ('not', 'in',),
    ast.Or: ('or',),
    ast.Pow: ('**',),
    ast.RShift: ('>>',),
    ast.Sub: ('-',),
    ast.UAdd: ('+',),
    ast.USub: ('-',),
}


if hasattr(ast, 'MatMult'):
  NODE_TYPE_TO_TOKENS[ast.MatMult] = ('@',)
