# Path: mako/compat.py
# def importlib_metadata_get(group):
#     ep = importlib_metadata.entry_points()
#     if hasattr(ep, "select"):
#         return ep.select(group=group)
#     else:
#         return ep.get(group, ())


from ast import parse
from .compat import importlib_metadata_get
        from mako import exceptions
import codecs
import collections
import operator
import os
import re
import timeit

    def union(self, other):
        """produce a 'union' of this dict and another (at the key level).

        values in the second dict take precedence over that of the first"""
        x = SetLikeDict(**self)
        x.update(other)
        return x


class FastEncodingBuffer:

    """a very rudimentary buffer that is faster than StringIO,
    and supports unicode data."""

    def __init__(self, encoding=None, errors="strict"):
        self.data = collections.deque()
        self.encoding = encoding
        self.delim = ""
        self.errors = errors
        self.write = self.data.append

    def truncate(self):
        self.data = collections.deque()
        self.write = self.data.append

    def getvalue(self):
        if self.encoding:
            return self.delim.join(self.data).encode(
                self.encoding, self.errors

# Path: mako/compat.py
# def importlib_metadata_get(group):
#     ep = importlib_metadata.entry_points()
#     if hasattr(ep, "select"):
#         return ep.select(group=group)
#     else:
#         return ep.get(group, ())


# Path: mako/util.py
from ast import parse
from .compat import importlib_metadata_get
        from mako import exceptions
import codecs
import collections
import operator
import os
import re
import timeit


    def union(self, other):
        """produce a 'union' of this dict and another (at the key level).

        values in the second dict take precedence over that of the first"""
        x = SetLikeDict(**self)
        x.update(other)
        return x


class FastEncodingBuffer:

    """a very rudimentary buffer that is faster than StringIO,
    and supports unicode data."""

    def __init__(self, encoding=None, errors="strict"):
        self.data = collections.deque()
        self.encoding = encoding
        self.delim = ""
        self.errors = errors
        self.write = self.data.append

    def truncate(self):
        self.data = collections.deque()
        self.write = self.data.append

    def getvalue(self):
        if self.encoding:
            return self.delim.join(self.data).encode(
                self.encoding, self.errors

            )