<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def render(file):
 """Render HTML from Markdown file content."""

    with file.open() as fp:
        encoding = detect_encoding(fp, default='utf-8')
        result = mistune.markdown(fp.read().decode(encoding))
        return result