def METHOD_NAME(self, filename):
    if os.path.exists(filename):
        # probably absolute, just return
        return filename
    doc_path = os.path.dirname(FreeCAD.ActiveDocument.FileName)
    prospective_path = os.path.join(doc_path, filename)
    if os.path.exists(prospective_path):
        return prospective_path