Hi @Clubdebambos I'm running exactly the same code that is provided in the link, with no changes. I also published my layers as imagery layers.
Here's what
imagery = gis.content.search("aerial*")
print(imagery)
returns (I loaded 4 layers and 4 these layers are displayed):
[<Item title:"aerial3" type:Image owner:MICGis>, <Item title:"aerial1" type:Image owner:MICGis>, <Item title:"aerial4" type:Image owner:MICGis>, <Item title:"aerial2" type:Image owner:MICGis>]