code: def print_permutations(self):
          
          index = 0
          permutations = []
          for p in self._input_permutations:
              permutations.append({'index': index, 'args': p})
              index += 1
          with open('permutations.json', 'w') as fh:
              json.dump(permutations, fh, indent=2)
          print('All permutations written to the "permutations.json" file.')
docs: Print all valid permutations.