def METHOD_NAME(filename, docname):
    """Get an active document and parse.
    If no document exists, it is created.
    Parameters
    ----------
    filename : str
        The path to the filename to be opened.
    docname : str
        The name of the active App::Document if one exists, or
        of the new one created.
    Returns
    -------
    App::Document
        The active FreeCAD document, or the document created if none exists,
        with the parsed information.
    """
    groupname = os.path.splitext(os.path.basename(filename))[0]
    try:
        doc = FreeCAD.getDocument(docname)
    except NameError:
        doc = FreeCAD.newDocument(docname)
    obj = process(filename)
    if obj is not None:
        importgroup = doc.addObject("App::DocumentObjectGroup", groupname)
        importgroup.Group = [obj]
    doc.recompute()