No need for this HTML to be in a function. Now instead of calling the function, just use get_template_part