I need help implementing the pattern searchusing the given pseudocode below. Please complete this questionusing Python language and provide sample inputs so I can understandthe formatting.

function pattern_search(current_goal); if current_goal is a member of closed else add current_goal to closed begin % test for loops then return FAIL while there remain unifying facts or rules do begin case current_goal unifies with
PayPal Gateway not configured
PayPal Gateway not configured