code: def _extract_secrets_from_patch(self, f, plugin, filename):
          
          output = {}
          for chunk in f:
              # target_lines refers to incoming (new) changes
              for line in chunk.target_lines():
                  if line.is_added:
                      output.update(
                          plugin.analyze_string(
                              line.value,
                              line.target_line_no,
                              filename,
                          ),
                      )
  
          return output
docs: Extract secrets from a given patch file object.
  
          Note that we only want to capture incoming secrets (so added lines).
  
          :type f: unidiff.patch.PatchedFile
          :type plugin: detect_secrets.plugins.base.BasePlugin
          :type filename: str