docs: def findDuplicates(tfam):
      """Finds the duplicates in a TFAM.
  
      :param tfam: representation of a ``tfam`` file.
      :type tfam: list
  
      :returns: two :py:class:`dict`, containing unique and duplicated samples
                position.
  
      """
      uSamples = {}
      dSamples = defaultdict(list)
      for i, row in enumerate(tfam):
          sampleID = tuple(row[:2])
          if sampleID not in uSamples:
              # This is the first time we see this sample
              uSamples[sampleID] = i
          else:
              # We have seen this sample at least once...
              if sampleID not in dSamples:
                  # This is the second time we see this sample...
                  dSamples[sampleID].extend([uSamples[sampleID], i])
              else:
                  # We have seen this sample multiple times
                  dSamples[sampleID].append(i)
  
      # Removing the duplicates from the unique samples
      for sampleID in dSamples.iterkeys():
          if sampleID in uSamples:
              del uSamples[sampleID]
  
      return uSamples, dSamples