<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cast_to_str(obj):
 """Return a string representation of a Seq or SeqRecord. Args: obj (str, Seq, SeqRecord):
 Biopython Seq or SeqRecord Returns: str: String representation of the sequence """


    if isinstance(obj, str):
        return obj
    if isinstance(obj, Seq):
        return str(obj)
    if isinstance(obj, SeqRecord):
        return str(obj.seq)
    else:
        raise ValueError('Must provide a string, Seq, or SeqRecord object.')