code: def pick_target_decoy(tfeature, dfeature):
      
      tscore, dscore = get_score(tfeature), get_score(dfeature)
      if tscore == dscore:
          # same score or both False
          return False
      elif False in [tscore, dscore]:
          # return the non-False feature
          return [v for k, v in {tscore: tfeature, dscore: dfeature}.items()
                  if k is not False][0]
      elif tscore > dscore:
          return tfeature
      elif tscore < dscore:
          return dfeature
      else:
          # in case uncaught edgecase occurs
          print('WARNING, target score {} and decoy score {} could not be '
                'compared'.format(tscore, dscore))
          return False
docs: Feed it with a target and decoy score and the protein/gene/id names,
      and this will return target/decoy type, the winning ID and the score