<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def x10_command_type(command):
 """Return the X10 command type from an X10 command."""

    command_type = X10CommandType.DIRECT
    if command in [X10_COMMAND_ALL_UNITS_OFF,
                   X10_COMMAND_ALL_LIGHTS_ON,
                   X10_COMMAND_ALL_LIGHTS_OFF]:
        command_type = X10CommandType.BROADCAST
    return command_type