def _get_definition_from_module(definitions_module, symbol):
    """Given a python module fetch the declaration of a variable."""
    path = definitions_module.__file__
    path = path.replace('.pyc', '.py')
    source = open(path, encoding='utf-8').readlines()
    text = None
    for line in source:
        if symbol == line.partition(' ')[0]:
            text = line
            continue
        if text is not None and (line == '' or '=' in line):
            # We found the end of the declaration
            return text
        if text is not None:
            text += line
    # Symbol could not be found
    return None
Given a python module fetch the declaration of a variable.