The Good Shepherd is a pericope found in John 10:1-21 in which Jesus is depicted as the Good Shepherd who lays down his life for the sheep. Similar imagery is used in Psalm 23. The Good Shepherd is revisited throughout the four Gospels in references to Jesus not letting himself lose any of his sheep.
The surrounding context of the allegorical story of the Good Shepherd (John 9:35-41 and John 10:22-30) shows that the people around Jesus realized that he was asserting that he was God. Biblical scholar Donald Guthrie maintains that the reaction of the Jews (picking up stones to stone him) shows that they understood that Jesus was asserting his own divinity. (Cf. Lev. 24:16)