code: def read_init(key):
      
      filename = os.path.join("traces", "__init__.py")
      result = None
      with open(filename) as stream:
          for line in stream:
              if key in line:
                  result = line.split('=')[-1].strip().replace("'", "")
  
      # throw error if version isn't in __init__ file
      if result is None:
          raise ValueError('must define %s in %s' % (key, filename))
  
      return result
docs: Parse the package __init__ file to find a variable so that it's not
      in multiple places.