def loads(s, expand_includes=True, include_position=False, include_comments=False, **kwargs):
p = Parser(expand_includes=expand_includes,<EOL>include_comments=include_comments, **kwargs)<EOL>ast = p.parse(s)<EOL>m = MapfileToDict(include_position=include_position,<EOL>include_comments=include_comments, **kwargs)<EOL>d = m.transform(ast)<EOL>return d<EOL>
Load a Mapfile from a string

Parameters
----------

s: string
    The Mapfile, or partial Mapfile, text
expand_includes: boolean
    Load any ``INCLUDE`` files in the MapFile
include_comments: boolean
     Include or discard comment strings from the Mapfile - *experimental*
include_position: boolean
     Include the position of the Mapfile tokens in the output

Returns
-------

dict
    A Python dictionary representing the Mapfile in the mappyfile format

Example
-------

To open a Mapfile from a string and return it as a dictionary object::

    s = '''MAP NAME "TEST" END'''

    d = mappyfile.loads(s)
    assert d["name"] == "TEST"