code: def get_imports(fname):
      
      txt = ''
      with open(fname, 'r') as f:
          for line in f:
              if line[0:6] == 'import':
                  txt += '<PRE>' + strip_text_after_string(line[7:], ' as ') + '</PRE>\n'
      return txt + '<BR>'
docs: get a list of imports from a Python program