<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def image(random=random, width=800, height=600, https=False, *args, **kwargs):
 """ Generate the address of a placeholder image. 'http://dummyimage.com/800x600/292929/e3e3e3&text=mighty poop' 'http://placekitten.com/60/60' 'http://dummyimage.com/1920x1080/292929/e3e3e3&text=To get to Westeros, you need to go to Britchestown, then drive west.' 'https://dummyimage.com/1920x1080/292929/e3e3e3&text=East Mysteryhall is in Westeros.' """

    target_fn = noun

    if width+height > 300:
        target_fn = thing
    if width+height > 2000:
        target_fn = sentence

    s = ""
    if https:
        s = "s"

    if random.choice([True, False]):
        return "http{s}://dummyimage.com/{width}x{height}/292929/e3e3e3&text={text}".format(
                s=s,
                width=width,
                height=height,
                text=target_fn(random=random))
    else:
        return "http{s}://placekitten.com/{width}/{height}".format(s=s, width=width, height=height)