Remove local function definition in _available_formats_helper()