<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tweet(ctx, message):
 """Sends a tweet directly to your timeline"""

    if not valid_tweet(message):
        click.echo("Message is too long for twitter.")
        click.echo("Message:" + message)
        ctx.exit(2)

    if not ctx.obj['DRYRUN']:
        ctx.obj['TWEEPY_API'].update_status(message)
    else:
        click.echo("Tweet not sent due to dry-run mode.")