def MergeFlags(self, args, unique=1, dict=None):
        """
        Merge the dict in args into the construction variables of this
        env, or the passed-in dict.  If args is not a dict, it is
        converted into a dict using ParseFlags.  If unique is not set,
        the flags are appended rather than merged.
        """

        if dict is None:
            dict = self
        if not SCons.Util.is_Dict(args):
            args = self.ParseFlags(args)
        if not unique:
            self.Append(**args)
            return self
        for key, value in args.items():
            if not value:
                continue
            try:
                orig = self[key]
            except KeyError:
                orig = value
            else:
                if not orig:
                    orig = value
                elif value:
                    # Add orig and value.  The logic here was lifted from
                    # part of env.Append() (see there for a lot of comments
                    # about the order in which things are tried) and is
                    # used mainly to handle coercion of strings to CLVar to
                    # "do the right thing" given (e.g.) an original CCFLAGS
                    # string variable like '-pipe -Wall'.
                    try:
                        orig = orig + value
                    except (KeyError, TypeError):
                        try:
                            add_to_orig = orig.append
                        except AttributeError:
                            value.insert(0, orig)
                            orig = value
                        else:
                            add_to_orig(value)
            t = []
            if key[-4:] == 'PATH':
                ### keep left-most occurence
                for v in orig:
                    if v not in t:
                        t.append(v)
            else:
                ### keep right-most occurence
                orig.reverse()
                for v in orig:
                    if t not in v:
                        t.insert(0, v)
            self[key] = t
        return self

#     def MergeShellPaths(self, args, prepend=1):
#         """
#         Merge the dict in args into the shell environment in env['ENV'].
#         Shell path elements are appended or prepended according to prepend.

#         Uses Pre/AppendENVPath, so it always appends or prepends uniquely.

#         Example: env.MergeShellPaths({'LIBPATH': '/usr/local/lib'})
#         prepends /usr/local/lib to env['ENV']['LIBPATH'].
#         """

#         for pathname, pathval in args.items():
#             if not pathval:
#                 continue
#             if prepend:
#                 self.PrependENVPath(pathname, pathval)
#             else:
#                 self.AppendENVPath(pathname, pathval)
dataset/ETHPy150Open kayhayen/Nuitka/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Environment.py/SubstitutionEnvironment.MergeFlags/swapped operands of `not in`