code: def clean_alternate_location_indicators(lines):
      '''
      Keeps only the first atom, if alternated location identifiers are being used
      Removes alternate location ID charactor
      '''
      new_lines = []
      previously_seen_alt_atoms = set()
      for line in lines:
          if line.startswith('ATOM'):
              alt_loc_id = line[16]
              if alt_loc_id != ' ':
                  atom_name = line[12:16].strip()
                  res_name = line[17:20].strip()
                  chain = line[21]
                  resnum = long( line[22:26].strip() )
                  loc_tup = (atom_name, res_name, chain, resnum)
                  if loc_tup in previously_seen_alt_atoms:
                      # Continue main for loop
                      continue
                  else:
                      previously_seen_alt_atoms.add( loc_tup )
                      line = line[:16] + ' ' + line[17:]
          new_lines.append(line)
      return new_linef clean_alternate_location_indicators(lines):
      '''
      Keeps only the first atom, if alternated location identifiers are being used
      Removes alternate location ID charactor
      '''
      new_lines = []
      previously_seen_alt_atoms = set()
      for line in lines:
          if line.startswith('ATOM'):
              alt_loc_id = line[16]
              if alt_loc_id != ' ':
                  atom_name = line[12:16].strip()
                  res_name = line[17:20].strip()
                  chain = line[21]
                  resnum = long( line[22:26].strip() )
                  loc_tup = (atom_name, res_name, chain, resnum)
                  if loc_tup in previously_seen_alt_atoms:
                      # Continue main for loop
                      continue
                  else:
                      previously_seen_alt_atoms.add( loc_tup )
                      line = line[:16] + ' ' + line[17:]
          new_lines.append(line)
      return new_lines
docs: Keeps only the first atom, if alternated location identifiers are being used
      Removes alternate location ID charactor