code: def get_genome_dir(gid, galaxy_dir, data):
      
      if galaxy_dir:
          refs = genome.get_refs(gid, None, galaxy_dir, data)
          seq_file = tz.get_in(["fasta", "base"], refs)
          if seq_file and os.path.exists(seq_file):
              return os.path.dirname(os.path.dirname(seq_file))
      else:
          gdirs = glob.glob(os.path.join(_get_data_dir(), "genomes", "*", gid))
          if len(gdirs) == 1 and os.path.exists(gdirs[0]):
              return gdirs[0]
docs: Return standard location of genome directories.