def display_available_branches():
    """Displays available branches."""

    branches = get_branches()

    if not branches:
        print(colored.red('No branches available'))
        return

    branch_col = len(max([b.name for b in branches], key=len)) + 1

    for branch in branches:

        try:
            branch_is_selected = (branch.name == get_current_branch_name())
        except __HOLE__:
            branch_is_selected = False

        marker = '*' if branch_is_selected else ' '
        color = colored.green if branch_is_selected else colored.yellow
        pub = '(published)' if branch.is_published else '(unpublished)'

        print(columns(
            [colored.red(marker), 2],
            [color(branch.name), branch_col],
            [black(pub), 14]
        ))
dataset/ETHPy150Open kennethreitz/legit/legit/cli.py/display_available_branches