solution class turkeyadapter(object)def __init__(selfturkey)self turkey turkey self fly_to turkey fly_to #delegate to native turkey method self gobble_count def quack(self)#adapt gobble to quack self turkey gobble(self gobble_countturkey turkey(turkeyduck turkeyadapter(turkeyturkeyduck fly_to( believe can fly turkeyduck quack(gobble gobble gobble adapter pattern applies several good design principlesuses composition to wrap the adaptee (turkeywith an altered interfacebinds the client to an interface not to an implementation