<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def has_metadata(source, ext):
 """Returns a flag indicating if a given block of MultiMarkdown text contains metadata."""

    _MMD_LIB.has_metadata.argtypes = [ctypes.c_char_p, ctypes.c_int]
    _MMD_LIB.has_metadata.restype = ctypes.c_bool
    return _MMD_LIB.has_metadata(source.encode('utf-8'), ext)