I occasionally come across questions that refer to several different source code files. In some questions, it's pretty clear which code belongs to which file, but not always. I often want to edit these questions to make the file association clearer and to make the question more readable, but there doesn't seem to be an obviously right way to format these.
Is there a good convention for representing this type of thing with SO markdown? Here are some of the examples I've seen for reference.
EDIT: I'm specifically referring to filename headers to code blocks, not formatting filenames in paragraph blocks (I think using inline-code or italics works well for that).
test.py (lead-in paragraph)
def blah():
some code
test.py (bolded)
def blah():
some code
test.py (H3)
def blah():
some code
test.py (horizontal rule)
def blah():
some code