def METHOD_NAME(self, seq):
    if isinstance(seq, list):
        for i in range(len(seq)):
            try:
                seq[i] = int(seq[i])
            except ValueError:
                pass
    else:
        seq = int(seq)
    return seq