code: def _get_secrets_to_compare(old_baseline, new_baseline):
      
      def _check_string(a, b):
          if a == b:
              return 0
          if a < b:
              return -1
          return 1
  
      def _check_secret(a, b):
          if a == b:
              return 0
  
          if a['line_number'] < b['line_number']:
              return -1
          elif a['line_number'] > b['line_number']:
              return 1
  
          return _check_string(a['hashed_secret'], b['hashed_secret'])
  
      secrets_to_compare = []
      for old_filename, new_filename in _comparison_generator(
          sorted(old_baseline['results'].keys()),
          sorted(new_baseline['results'].keys()),
          compare_fn=_check_string,
      ):
          if not new_filename:
              secrets_to_compare += list(
                  map(
                      lambda x: (old_filename, x, True,),
                      old_baseline['results'][old_filename],
                  ),
              )
              continue
          elif not old_filename:
              secrets_to_compare += list(
                  map(
                      lambda x: (new_filename, x, False,),
                      new_baseline['results'][new_filename],
                  ),
              )
              continue
  
          for old_secret, new_secret in _comparison_generator(
              old_baseline['results'][old_filename],
              new_baseline['results'][new_filename],
              compare_fn=_check_secret,
          ):
              if old_secret == new_secret:
                  # If they are the same, no point flagging it.
                  continue
  
              if old_secret:
                  secrets_to_compare.append(
                      (old_filename, old_secret, True,),
                  )
              else:
                  secrets_to_compare.append(
                      (new_filename, new_secret, False,),
                  )
  
      return secrets_to_compare
docs: :rtype: list(tuple)
      :param: tuple is in the following format:
          filename: str; filename where identified secret is found
          secret: dict; PotentialSecret json representation
          is_secret_removed: bool; has the secret been removed from the
              new baseline?