def media_kind(kind):
if kind in [<NUM_LIT:1>]:<EOL><INDENT>return const.MEDIA_TYPE_UNKNOWN<EOL><DEDENT>if kind in [<NUM_LIT:3>, <NUM_LIT:7>, <NUM_LIT:11>, <NUM_LIT:12>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT:32>]:<EOL><INDENT>return const.MEDIA_TYPE_VIDEO<EOL><DEDENT>if kind in [<NUM_LIT:2>, <NUM_LIT:4>, <NUM_LIT:10>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>]:<EOL><INDENT>return const.MEDIA_TYPE_MUSIC<EOL><DEDENT>if kind in [<NUM_LIT:8>, <NUM_LIT:64>]:<EOL><INDENT>return const.MEDIA_TYPE_TV<EOL><DEDENT>raise exceptions.UnknownMediaKind('<STR_LIT>' + str(kind))<EOL>
Convert iTunes media kind to API representation.