protected function extractAllLongOpts(ArgumentsSpec $arguments_spec, $parsed_args) {
    $long_opts = array();

    foreach ($parsed_args['options'] as $option_name => $value) {
      if ($long_option_name = $arguments_spec->normalizeOptionName($option_name)) {
        $long_opts[$long_option_name] = $value;
      }
    }

    return $long_opts;
  }