def _lookup_variable_definition(variable, lines):
    """Return the right-hand side of a variable definition."""
    prefixes = f"{variable} = ", f"export {variable} = "
    for line in lines:
        for prefix in prefixes:
            if line.startswith(prefix):
                return line[len(prefix) :]