code: def picard_index_ref(picard, ref_file):
      
      dict_file = "%s.dict" % os.path.splitext(ref_file)[0]
      if not file_exists(dict_file):
          with file_transaction(picard._config, dict_file) as tx_dict_file:
              opts = [("REFERENCE", ref_file),
                      ("OUTPUT", tx_dict_file)]
              picard.run("CreateSequenceDictionary", opts)
      return dict_file
docs: Provide a Picard style dict index file for a reference genome.