<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _magic_data(filename=os.path.join(here, 'magic_data.json')):
 """ Read the magic file"""

    with open(filename) as f:
        data = json.load(f)
    headers = [_create_puremagic(x) for x in data['headers']]
    footers = [_create_puremagic(x) for x in data['footers']]
    return headers, footers