code: def iter_change_type(self, change_type):
          
          if change_type not in self.change_type:
              raise ValueError("Invalid change type: %s" % change_type)
  
          for diff in self:
              if diff.change_type == change_type:
                  yield diff
              elif change_type == "A" and diff.new_file:
                  yield diff
              elif change_type == "D" and diff.deleted_file:
                  yield diff
              elif change_type == "R" and diff.renamed:
                  yield diff
              elif change_type == "M" and diff.a_blob and diff.b_blob and diff.a_blob != diff.b_blob:
                  yield diff
docs: :return:
              iterator yielding Diff instances that match the given change_type
  
          :param change_type:
              Member of DiffIndex.change_type, namely:
  
              * 'A' for added paths
              * 'D' for deleted paths
              * 'R' for renamed paths
              * 'M' for paths with modified data
              * 'T' for changed in the type paths