<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def howToMigrate(self, fromVersion, toVersion=None):
 """Given a starting version and an ending version returns filenames of all the migrations in that range, exclusive. e.g.: [fromVersion, toVersion) """

        # slice notation [start:end:step]
        # by adding a step of 1 we make a slice from 0:0 be empty
        # rather than containing the whole list.
        if toVersion is not None:
            return self.migrations[fromVersion:toVersion:1]
        else:
            return self.migrations[fromVersion::1]