run_cmd seems to take an instance of powerline as its first argument. Do you think I should pass that instance into _get_capacity() just to use run_cmd? I don't see a way to get that instance from the global scope otherwise.