<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def between(self, start, end):
 """Adds new `BETWEEN` condition :param start: int or datetime compatible object (in SNOW user's timezone) :param end: int or datetime compatible object (in SNOW user's timezone) :raise: - QueryTypeError: if start or end arguments is of an invalid type """


        if hasattr(start, 'strftime') and hasattr(end, 'strftime'):
            dt_between = (
              'javascript:gs.dateGenerate("%(start)s")'
              "@"
              'javascript:gs.dateGenerate("%(end)s")'
            ) % {
              'start': start.strftime('%Y-%m-%d %H:%M:%S'),
              'end': end.strftime('%Y-%m-%d %H:%M:%S')
            }
        elif isinstance(start, int) and isinstance(end, int):
            dt_between = '%d@%d' % (start, end)
        else:
            raise QueryTypeError("Expected `start` and `end` of type `int` "
                                 "or instance of `datetime`, not %s and %s" % (type(start), type(end)))

        return self._add_condition('BETWEEN', dt_between, types=[str])