<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def realpred(cls, lemma, pos, sense=None):
 """Instantiate a Pred from its components."""

        string_tokens = [lemma]
        if pos is not None:
            string_tokens.append(pos)
        if sense is not None:
            sense = str(sense)
            string_tokens.append(sense)
        predstr = '_'.join([''] + string_tokens + ['rel'])
        return cls(Pred.REALPRED, lemma, pos, sense, predstr)