<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def replace_built(self, built_packages):
 """Return a copy of this resolvable set but with built packages. :param dict built_packages: A mapping from a resolved package to its locally built package. :returns: A new resolvable set with built package replacements made. """

    def map_packages(resolved_packages):
      packages = OrderedSet(built_packages.get(p, p) for p in resolved_packages.packages)
      return _ResolvedPackages(resolved_packages.resolvable, packages,
                               resolved_packages.parent, resolved_packages.constraint_only)

    return _ResolvableSet([map_packages(rp) for rp in self.__tuples])