The phrase 依样画葫芦 (yi yang hua hu lu) means: draw a gourd by copying a gourd. Take the model in front of you and reproduce it. Do not improve it. Do not interpret it.
In English we would say painting by numbers, or working from a template, or turning out the same cookie-cutter shape.
Today the words are an insult. They mean a man with no ideas of his own, copying whatever is put in front of him. That is not what they meant when they were written. They were written on a wall by a man complaining that he had ideas and was not allowed to use them.
The source is a notebook by the Song writer Wei Tai, volume one. Four lines of verse:
Office depends on where you were born. Ability counts for nothing when nobody needs it. Laugh, then, at Tao the Hanlin scholar, year after year drawing the same gourd.

Start with the man.
Tao Gu came from Xinping in the north-west. His family name was originally Tang. He changed it to Tao because the emperor of the later Jin was called Shi Jingtang, and one syllable of the imperial name was taboo.
He had a frightening memory. Histories, philosophers, Buddhist and Daoist canon, all of it. He collected calligraphy and painting, and his own hand was good.
A man like that, in the Five Dynasties, was a scarce resource. Dynasties fell one after another. Emperors came and went. But every one of them needed somebody who could draft an edict, quote a precedent, and get the ritual wording right.
So Tao Gu stayed employed. Later Jin, later Han, later Zhou. He rose to the Hanlin Academy, the imperial writing office, where the most important few lines in the empire left the building in his handwriting.
Under the second Zhou emperor he was sent south on a mission to the state of Southern Tang.
That journey was the worst thing that ever happened to him.
By then Southern Tang was no longer the power it had been at its founding. The Zhou had taken the fourteen prefectures north of the Yangtze in three campaigns, and the ruler Li Jing had given up the title of emperor, calling himself only the lord of the south bank. He even used the Zhou calendar. A state that has submitted still has to call the envoy of the winning side an angel from above.
Tao Gu arrived at Jinling with his nose in the air. He was the envoy of the superior court. He spoke with an edge. He looked at people out of the corner of an eye. The Southern Tang officials who came to receive him were treated as furniture.
The Southern Tang could not stand it.
Han Xizai was in office there, the same Han Xizai who would later be painted at his own night banquet. He had spotted one weakness in Tao Gu: the man was proud, and proud men cannot bear to be seen being ordinary.
He arranged a woman. Her surname was Qin, her given name Ruolan. Some accounts call her the daughter of a post-station servant. Others say she was a singer from the household of Han Xizai. Either way she was placed in the post station where Tao Gu was lodged, sweeping the courtyard, carrying tea.
At first he ignored her. But a man in a foreign country, alone for weeks, writing poems nobody would read, and then a young woman is sweeping the yard, looks up at him once, and looks down again. That is difficult to ignore indefinitely.
The history is brief about what followed: Tao Gu was pleased with her.
He wrote her a lyric to the tune Fair Weather:
Good fate, bad fate, one night of sleep in a post station. Parting from an immortal. The pipa has played through every tune of longing, and few understand. When the broken string is joined with phoenix glue, what year will that be?
An envoy of the superior court, writing about loneliness under a lamp in a post station, for a woman who swept the yard.
A few days later Li Jing held a banquet in the Chengxin Hall and invited Tao Gu.
After a few rounds, Li Jing said a fine lyric had come his way, and would the envoy care to hear it. Then a singer came out with a pipa and began:
Good fate, bad fate, one night of sleep in a post station.
Tao Gu went white in his seat.
Nobody in the room said anything. There was only the pipa. When the song ended, Li Jing raised his cup and drank to him, very politely.
Tao Gu asked leave that same day and went back north.
The story was told in the south for decades. Tao Gu was the most learned man in any room he entered, and what the south remembered him for was that lyric.
North again, he was still in the Hanlin Academy.
The Song replaced the Zhou. Zhao Kuangyin took the throne, and Tao Gu went on drafting edicts for the new dynasty. New courts need proclamations, ritual manuals, and prayers for the sacrifice to heaven. He could do all of it with his eyes shut.
He wanted something else.
He thought he should be chancellor. His reasoning was practical: he had been in the academy too long, through three dynasties, and the edicts he had written would stack higher than a man. By seniority, by precedent, the seat should come to him.
The founding emperor did not give it to him.
Worse, there was an incident that cost him face. The emperor once remarked that a chancellor has to be a man of learning. Tao Gu, standing nearby, agreed at once: Your Majesty is right, a chancellor must be a scholar. The emperor asked where the saying came from. Tao Gu said: everything I remember comes from the sages. The emperor laughed and said: that is not an old saying. I made it up myself.
A man who could recite the classics backwards, caught promoting an emperor casual remark into the words of a sage, on the spot.
He stayed in the academy.
So he wrote the poem and put it on the wall of the Hanlin Academy.
The first two lines complain. Office depends on where you were born and what times you happen to live in. Ability, when nobody needs it, might as well not exist.
The last two lines mock himself. Laugh at Tao the Hanlin scholar, year after year drawing the same gourd.
At the time this was not an insult. It was an accurate job description. Work in the Hanlin Academy was copying by design: how the previous dynasty worded it, how this one words it; which form for an edict, which tone for a rescript. Half the skill of a Hanlin scholar was literary. The other half was remembering the precedents.
But he wrote the complaint on the wall.
The emperor saw it. The history gives three characters: he was not pleased.
Why not, we are not told. Perhaps it read as asking for a job. Perhaps it read as resentment. Either way, the chancellorship ended there.
Tao Gu ended his career as minister of rites and died in 970, aged sixty-eight. He never sat in the seat he wanted.
And the four characters stayed, with the meaning bent around.
Tao Gu meant the first half: I could draw something else, and you only let me copy.
Later users fastened on the gourd: whatever you draw, it is still just a gourd, with nothing of you in it.
One reading is a grievance. The other is a sneer. Between them lie nine hundred years.
The joke is that the sneer turned out to be accurate, and Tao Gu made it accurate himself.
He was learned, and his learning was for matching precedents. He was brilliant, and his best-known work is a lyric that was sung back at him in public. The two lines he wrote on the wall, meant to say I am more than this, became the standard phrase for a man who is nothing but this.
A man too good at copying the model ended up writing even his own grievance in a borrowed shape: four seven-character lines, two of argument, two of self-mockery. The form had been worked to death by the Tang.
The wall in the Hanlin Academy was whitewashed many times. The poem is gone. The four characters are not.
That is the quiet cruelty of Chinese proverbs. A Chinese fable usually keeps its point. A Chinese proverb usually loses it. Here the phrase survived by changing sides, and the man who coined it is remembered for the meaning he was arguing against.