'If locals are provided, create a copy of self containing those
locals in addition to what is already in this variable proxy.'

def add_locals(self, locals):

    if (locals is None):
        return self
    return AnsibleJ2Vars(self._templar, self._globals, locals=locals, *self._extras)
