<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse_radl(data):
 """ Parse a RADL document. Args: - data(str):
 filepath to a RADL content or a string with content. Return: RADL object. """


    if data is None:
        return None
    elif os.path.isfile(data):
        f = open(data)
        data = "".join(f.readlines())
        f.close()
    elif data.strip() == "":
        return RADL()
    data = data + "\n"

    parser = RADLParser(lextab='radl')
    return parser.parse(data)