import _ast


def BinOpMap(operator):
  """Maps operator strings for binary operations to their _ast node."""
  op_dict = {
      '+': _ast.Add,
      '-': _ast.Sub,
      '*': _ast.Mult,
      '**': _ast.Pow,
      '/': _ast.Div,
      '//': _ast.FloorDiv,
      '%': _ast.Mod,
      '<<': _ast.LShift,
      '>>': _ast.RShift,
      '|': _ast.BitOr,
      '&': _ast.BitAnd,
      '^': _ast.BitXor,
  }

  return op_dict[operator]()