<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_variant_and_transcript( cls, variant, transcript, context_size):
 """ Extracts the reference sequence around a variant locus on a particular transcript and determines the reading frame at the start of that sequence context. Parameters variant : varcode.Variant transcript : pyensembl.Transcript context_size : int Returns SequenceKeyWithReadingFrame object or None if Transcript lacks coding sequence, protein sequence or annotated start/stop codons. """

        if not transcript.contains_start_codon:
            logger.info(
                "Expected transcript %s for variant %s to have start codon",
                transcript.name,
                variant)
            return None

        if not transcript.contains_stop_codon:
            logger.info(
                "Expected transcript %s for variant %s to have stop codon",
                transcript.name,
                variant)
            return None

        if not transcript.protein_sequence:
            logger.info(
                "Expected transript %s for variant %s to have protein sequence",
                transcript.name,
                variant)
            return None

        sequence_key = ReferenceSequenceKey.from_variant_and_transcript(
            variant=variant,
            transcript=transcript,
            context_size=context_size)

        if sequence_key is None:
            logger.info(
                "No sequence key for variant %s on transcript %s",
                variant,
                transcript.name)
            return None

        return cls.from_variant_and_transcript_and_sequence_key(
            variant=variant,
            transcript=transcript,
            sequence_key=sequence_key)