import _ast


def BoolOpMap(operator):
  """Maps operator strings for boolean operations to their _ast node."""
  op_dict = {
      'and': _ast.And,
      'or': _ast.Or,
  }

  return op_dict[operator]()