<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def read_scamp_head(fname, header=None):
 """ read a SCAMP .head file as a fits header FITSHDR object parameters fname: string The path to the SCAMP .head file header: FITSHDR, optional Optionally combine the header with the input one. The input can be any object convertable to a FITSHDR object returns ------- header: FITSHDR A fits header object of type FITSHDR """


    with open(fname) as fobj:
        lines = fobj.readlines()

    lines = [l.strip() for l in lines if l[0:3] != 'END']

    # if header is None an empty FITSHDR is created
    hdr = FITSHDR(header)

    for l in lines:
        hdr.add_record(l)

    return hdr