<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def index_genome_alignment_by_locus(fh, out_fh, verbose=False):
 """Build an index for a genome alig. using coords in ref genome as keys."""

  bound_iter = functools.partial(genome_alignment_iterator,
                                 reference_species="hg19", index_friendly=True)
  hash_func = JustInTimeGenomeAlignmentBlock.build_hash
  idx = IndexedFile(fh, bound_iter, hash_func)
  idx.write_index(out_fh, verbose=verbose)