def METHOD_NAME(self, pretty=True):
    """Compile all code and return a dict {name: code} where the keys
    are determined by the keyword arguments passed to __init__().
    Parameters
    ----------
    pretty : bool
        If True, use a slower method to mangle object names. This produces
        GLSL that is more readable.
        If False, then the output is mostly unreadable GLSL, but is about
        10x faster to compile.
    """
    # Authoritative mapping of {obj: name}
    self._object_names = {}
    #
    # 1. collect list of dependencies for each shader
    #
    # maps {shader_name: [deps]}
    self._shader_deps = {}
    for shader_name, shader in self.shaders.items():
        this_shader_deps = []
        self._shader_deps[shader_name] = this_shader_deps
        dep_set = set()
        for dep in shader.dependencies(sort=True):
            # visit each object no more than once per shader
            if dep.name is None or dep in dep_set:
                continue
            this_shader_deps.append(dep)
            dep_set.add(dep)
    #
    # 2. Assign names to all objects.
    #
    if pretty:
        self._rename_objects_pretty()
    else:
        self._rename_objects_fast()
    #
    # 3. Now we have a complete namespace; concatenate all definitions
    # together in topological order.
    #
    compiled = {}
    obj_names = self._object_names
    for shader_name, shader in self.shaders.items():
        code = []
        version = shader.version_pragma
        for dep in self._shader_deps[shader_name]:
            dep_code = dep.definition(obj_names, version, shader)
            if dep_code is not None:
                code.append(dep_code)
        if version is not None:
            code.insert(0, '#version %s %s' % version)
        compiled[shader_name] = '\n'.join(code)
    self.code = compiled
    return compiled