<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def repeat(mode):
 """Change repeat mode of current player."""

    message = command(protobuf.CommandInfo_pb2.ChangeShuffleMode)
    send_command = message.inner()
    send_command.options.externalPlayerCommand = True
    send_command.options.repeatMode = mode
    return message