code: def get_transcript(self, gene_pk, refseq_id):
          "Get a transcript from the cache or add a new record."
          if not refseq_id:
              return
          transcript_pk = self.transcripts.get(refseq_id)
          if transcript_pk:
              return transcript_pk
          gene = Gene(pk=gene_pk)
          transcript = Transcript(refseq_id=refseq_id, gene=gene)
          try:
              transcript.save()
          except IntegrityError:
              transcript = Transcript.objects.get(refseq_id=refseq_id, gene=gene)
          self.transcripts[refseq_id] = transcript.pk
          return transcript.pf get_transcript(self, gene_pk, refseq_id):
          "Get a transcript from the cache or add a new record."
          if not refseq_id:
              return
          transcript_pk = self.transcripts.get(refseq_id)
          if transcript_pk:
              return transcript_pk
          gene = Gene(pk=gene_pk)
          transcript = Transcript(refseq_id=refseq_id, gene=gene)
          try:
              transcript.save()
          except IntegrityError:
              transcript = Transcript.objects.get(refseq_id=refseq_id, gene=gene)
          self.transcripts[refseq_id] = transcript.pk
          return transcript.pk
docs: Get a transcript from the cache or add a new record.