<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def draw(self, d, i=None):
        '''
        Adds a domino to the hand.

        :param Domino d: domino to add to the hand
        :param int i: index at which to add the domino;
                      by default adds to the end of the hand
        :return: None
        '''
        if i is None:
            self._dominoes.append(d)
        else:
            self._dominoes.insert(i, d)