<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_python(self):
 """Return cursor if multi-select, direct value if single-select"""

        cursor = super(ReferenceField, self).get_python()

        if self.multiselect:
            return cursor

        else:
            try:
                return cursor[0]
            except IndexError:
                return None