Move WordPress Admin Collapse Menu

Hi – I am trying to move the wordpress admin collapse menu button to the top admin bar but having trouble doing so.

This is what I have added to my functions.php file but it isn’t working properly.

function collapse_menu_button($wp_admin_bar){
$args = array(
'id' => 'collapse-button',
'title' => '<button type="button" id="collapse-button" aria-label="Collapse Main menu" aria-expanded="true"><span class="collapse-button-icon" aria-hidden="true"></span><span class="collapse-button-label">Collapse menu</span></button>',
'meta' => array(
'class' => 'collapse-button-label'
)
);
$wp_admin_bar->add_node($args);
}
add_action('admin_bar_menu', 'collapse_menu_button', 0);

What do I need to edit in this so that it will work properly?

Thank you!