Implement a custom tooltip component and run it to show the UI.
Asked in the Round 1 stage. HackerRank, must execute and render.
Implement a tooltip that appears on hover or keyboard focus, hides on mouse leave or blur, and supports placement above or below the trigger. The component should accept a trigger element, tooltip text, and placement, then return rendered UI state for grading.
trigger: string label for the trigger elementcontent: string shown inside the tooltipplacement: one of "top" or "bottom"Return a representation of the rendered tooltip state, including whether it is visible and its resolved placement.
def custom_tooltip(trigger, content, placement):