def get_branch_condition(branch):
    """
    Extract branchCondition_GuardedBranchTransition from specification, e.g.
    "type.VALUE == &quot;graphical&quot;" -> "#graphical"
    :param branch: "branches_Branch"
    :return: extracted condition string
    """
    branch_condition = branch.find("./branchCondition_GuardedBranchTransition").get(
        "specification").split("==")[-1].replace('"', "").replace(" ", "")
    branch_condition = '#{condition}#'.format(condition=branch_condition)
    return branch_condition