<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def t_to_p(self, var_t):
 """Return a protein variant, or "non-coding" for non-coding variant types CAUTION: Unlike other x_to_y methods that always return SequenceVariant instances, this method returns a string when the variant type is ``n``. This is intended as a convenience, particularly when looping over ``relevant_transcripts``, projecting with ``g_to_t``, then desiring a protein representation for coding transcripts. """

        if var_t.type == "n":
            return "non-coding"
        if var_t.type == "c":
            return self.c_to_p(var_t)
        raise HGVSInvalidVariantError("Expected a coding (c.) or non-coding (n.) variant; got " +
                                      str(var_t))