<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def newarray(self, length, value=0):
 """Initialise empty row"""

        if self.bitdepth > 8:
            return array('H', [value] * length)
        else:
            return bytearray([value] * length)