how to create a function called Pattern that has a pattern like this?

how to make one function to generate logic like image, I have tried but haven't generated it yet. I'm confused on the '.o' part and the duplication at the bottom. thank you hope you can help

https://i.stack.imgur.com/PwCd4.png