code: def _get_indexes_in_altered_table(self, diff):
          
          indexes = diff.from_table.get_indexes()
          column_names = self._get_column_names_in_altered_table(diff)
  
          for key, index in OrderedDict([(k, v) for k, v in indexes.items()]).items():
              for old_index_name, renamed_index in diff.renamed_indexes.items():
                  if key.lower() == old_index_name.lower():
                      del indexes[key]
  
              changed = False
              index_columns = []
              for column_name in index.get_columns():
                  normalized_column_name = column_name.lower()
                  if normalized_column_name not in column_names:
                      del indexes[key]
                      break
                  else:
                      index_columns.append(column_names[normalized_column_name])
                      if column_name != column_names[normalized_column_name]:
                          changed = True
  
              if changed:
                  indexes[key] = Index(
                      index.get_name(),
                      index_columns,
                      index.is_unique(),
                      index.is_primary(),
                      index.get_flags(),
                  )
  
              for index in diff.removed_indexes.values():
                  index_name = index.get_name().lower()
                  if index_name and index_name in indexes:
                      del indexes[index_name]
  
              changed_indexes = (
                  list(diff.changed_indexes.values())
                  + list(diff.added_indexes.values())
                  + list(diff.renamed_indexes.values())
              )
              for index in changed_indexes:
                  index_name = index.get_name().lower()
                  if index_name:
                      indexes[index_name] = index
                  else:
                      indexes[len(indexes)] = index
  
          return indexes
docs: :param diff: The table diff
          :type diff: orator.dbal.table_diff.TableDiff
  
          :rtype: dict