<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(filename, paramfile, bdfdir, scan):
 """ Simple parse and return metadata for pipeline for first scan """


    filename = os.path.abspath(filename)

    scans = ps.read_scans(filename, bdfdir=bdfdir)
    logger.info('Scans, Target names:')
    logger.info('%s' % str([(ss, scans[ss]['source']) for ss in scans]))
    logger.info('Example pipeline:')
    state = rt.set_pipeline(filename, scan, paramfile=paramfile, logfile=False)