<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_row(self, index, default=None):
 """Return the row at the given index or the default value."""

        if not isinstance(index, int) or index < 0 or index >= len(self._rows):
            return default
        return self._rows[index]