



from typing import Optional, Tuple, Union

import tensorflow as tf

from ...activations_tf import ACTaFN
from ...file_utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward
from ...modeling_tf_outputs import (
    TFBaseModelOutputWithNoAttention,
    TFBaseModelOutputWithPoolingAndNoAttention,
    TFSequenceClassifierOutput,
)
from ...modeling_tf_utils import TFPreTrainedModel, TFSequenceClassificationLoss, keras_serializable, unpack_inputs
from ...tf_utils import shape_list
from ...utils import logging
from .configuration_regnet import RegNetConfig


_lowerCamelCase    :		Optional[int]		      =    logging.get_logger(__name__)

# General docstring
_lowerCamelCase    :		Optional[Any]		      =    """RegNetConfig"""

# Base docstring
_lowerCamelCase    :		Tuple		      =    """facebook/regnet-y-040"""
_lowerCamelCase    :		Dict		      =    [1, 1_088, 7, 7]

# Image classification docstring
_lowerCamelCase    :		Tuple		      =    """facebook/regnet-y-040"""
_lowerCamelCase    :		Dict		      =    """tabby, tabby cat"""

_lowerCamelCase    :		List[str]		      =    [
    """facebook/regnet-y-040""",
    # See all regnet models at https://huggingface.co/models?filter=regnet
]


class 						lowercase    (							tf.keras.layers.Layer):
						'''simple docstring'''


						def __init__(  self    :				Any       ,	snake_case    :				int       ,	snake_case    :				int = 3       ,	snake_case    :				int = 1       ,	snake_case    :				int = 1       ,	snake_case    :				Optional[str] = "relu"       ,	**snake_case    :				Optional[Any]       ,	):



											'''simple docstring'''


											super().__init__(**snake_case	)
											# The padding and conv has been verified in
											# https://colab.research.google.com/gist/sayakpaul/854bc10eeaf21c9ee2119e0b9f3841a7/scratchpad.ipynb
											SCREAMING_SNAKE_CASE							:     str						=				tf.keras.layers.ZeroPaddingaD(padding=kernel_size // 2	)
											SCREAMING_SNAKE_CASE							:     List[str]						=				tf.keras.layers.ConvaD(
											    filters=snake_case       ,	kernel_size=snake_case       ,	strides=snake_case       ,	padding='VALID'       ,	groups=snake_case       ,	use_bias=snake_case       ,	name='convolution'       ,	)
											SCREAMING_SNAKE_CASE							:     Dict						=				tf.keras.layers.BatchNormalization(epsilon=1E-5       ,	momentum=0.9       ,	name='normalization'	)
											SCREAMING_SNAKE_CASE							:     Union[str, Any]						=				ACTaFN[activation] if activation is not None else tf.identity







						def       lowerCamelCase_				(  self    :				List[str]       ,	snake_case    :				str	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     Optional[int]						=				self.convolution(self.padding(snake_case	)	)
											SCREAMING_SNAKE_CASE							:     Any						=				self.normalization(snake_case	)
											SCREAMING_SNAKE_CASE							:     Dict						=				self.activation(snake_case	)
											return hidden_state


class 						lowercase    (							tf.keras.layers.Layer):
						'''simple docstring'''


						def __init__(  self    :				List[Any]       ,	snake_case    :				RegNetConfig       ,	**snake_case    :				str	):



											'''simple docstring'''


											super().__init__(**snake_case	)
											SCREAMING_SNAKE_CASE							:     Optional[Any]						=				config.num_channels
											SCREAMING_SNAKE_CASE							:     int						=				TFRegNetConvLayer(
											    out_channels=config.embedding_size       ,	kernel_size=3       ,	stride=2       ,	activation=config.hidden_act       ,	name='embedder'       ,	)







						def       lowerCamelCase_				(  self    :				str       ,	snake_case    :				Optional[int]	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     Union[str, Any]						=				shape_list(snake_case	)[1]
											if tf.executing_eagerly() and num_channels != self.num_channels:
																raise ValueError(
																    'Make sure that the channel dimension of the pixel values match with the one set in the configuration.'	)

											# When running on CPU, `tf.keras.layers.Conv2D` doesn't support `NCHW` format.
											# So change the input format from `NCHW` to `NHWC`.
											# shape = (batch_size, in_height, in_width, in_channels=num_channels)
											SCREAMING_SNAKE_CASE							:     Optional[Any]						=				tf.transpose(snake_case       ,	perm=(0, 2, 3, 1)	)
											SCREAMING_SNAKE_CASE							:     List[Any]						=				self.embedder(snake_case	)
											return hidden_state


class 						lowercase    (							tf.keras.layers.Layer):
						'''simple docstring'''


						def __init__(  self    :				int       ,	snake_case    :				int       ,	snake_case    :				int = 2       ,	**snake_case    :				int	):



											'''simple docstring'''


											super().__init__(**snake_case	)
											SCREAMING_SNAKE_CASE							:     str						=				tf.keras.layers.ConvaD(
											    filters=snake_case       ,	kernel_size=1       ,	strides=snake_case       ,	use_bias=snake_case       ,	name='convolution'	)
											SCREAMING_SNAKE_CASE							:     Dict						=				tf.keras.layers.BatchNormalization(epsilon=1E-5       ,	momentum=0.9       ,	name='normalization'	)







						def       lowerCamelCase_				(  self    :				Dict       ,	snake_case    :				tf.Tensor       ,	snake_case    :				bool = False	):



											'''simple docstring'''


											return self.normalization(self.convolution(snake_case	)       ,	training=snake_case	)


class 						lowercase    (							tf.keras.layers.Layer):
						'''simple docstring'''


						def __init__(  self    :				Union[str, Any]       ,	snake_case    :				int       ,	snake_case    :				int       ,	**snake_case    :				Union[str, Any]	):



											'''simple docstring'''


											super().__init__(**snake_case	)
											SCREAMING_SNAKE_CASE							:     Any						=				tf.keras.layers.GlobalAveragePoolingaD(keepdims=snake_case       ,	name='pooler'	)
											SCREAMING_SNAKE_CASE							:     Any						=				[
											    tf.keras.layers.ConvaD(filters=snake_case       ,	kernel_size=1       ,	activation='relu'       ,	name='attention.0'	),
											    tf.keras.layers.ConvaD(filters=snake_case       ,	kernel_size=1       ,	activation='sigmoid'       ,	name='attention.2'	),
											]







						def       lowerCamelCase_				(  self    :				List[str]       ,	snake_case    :				Dict	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     Tuple						=				self.pooler(snake_case	)
											for layer_module in self.attention:
																SCREAMING_SNAKE_CASE							:     List[str]						=				layer_module(snake_case	)
											SCREAMING_SNAKE_CASE							:     List[str]						=				hidden_state * pooled
											return hidden_state


class 						lowercase    (							tf.keras.layers.Layer):
						'''simple docstring'''


						def __init__(  self    :				Dict       ,	snake_case    :				RegNetConfig       ,	snake_case    :				int       ,	snake_case    :				int       ,	snake_case    :				int = 1       ,	**snake_case    :				Any	):



											'''simple docstring'''


											super().__init__(**snake_case	)
											SCREAMING_SNAKE_CASE							:     int						=				in_channels != out_channels or stride != 1
											SCREAMING_SNAKE_CASE							:     Optional[int]						=				max(1       ,	out_channels // config.groups_width	)
											SCREAMING_SNAKE_CASE							:     Tuple						=				(
											    TFRegNetShortCut(snake_case       ,	stride=snake_case       ,	name='shortcut'	)
											    if should_apply_shortcut
											    else tf.keras.layers.Activation('linear'       ,	name='shortcut'	)
											)
											# `self.layers` instead of `self.layer` because that is a reserved argument.
											SCREAMING_SNAKE_CASE							:     Tuple						=				[
											    TFRegNetConvLayer(snake_case       ,	kernel_size=1       ,	activation=config.hidden_act       ,	name='layer.0'	),
											    TFRegNetConvLayer(
											        snake_case       ,	stride=snake_case       ,	groups=snake_case       ,	activation=config.hidden_act       ,	name='layer.1'	),
											    TFRegNetConvLayer(snake_case       ,	kernel_size=1       ,	activation=snake_case       ,	name='layer.2'	),
											]
											SCREAMING_SNAKE_CASE							:     int						=				ACTaFN[config.hidden_act]







						def       lowerCamelCase_				(  self    :				Tuple       ,	snake_case    :				List[str]	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     Optional[int]						=				hidden_state
											for layer_module in self.layers:
																SCREAMING_SNAKE_CASE							:     List[str]						=				layer_module(snake_case	)
											SCREAMING_SNAKE_CASE							:     Tuple						=				self.shortcut(snake_case	)
											hidden_state += residual
											SCREAMING_SNAKE_CASE							:     Dict						=				self.activation(snake_case	)
											return hidden_state


class 						lowercase    (							tf.keras.layers.Layer):
						'''simple docstring'''


						def __init__(  self    :				Optional[int]       ,	snake_case    :				RegNetConfig       ,	snake_case    :				int       ,	snake_case    :				int       ,	snake_case    :				int = 1       ,	**snake_case    :				Optional[int]	):



											'''simple docstring'''


											super().__init__(**snake_case	)
											SCREAMING_SNAKE_CASE							:     List[Any]						=				in_channels != out_channels or stride != 1
											SCREAMING_SNAKE_CASE							:     str						=				max(1       ,	out_channels // config.groups_width	)
											SCREAMING_SNAKE_CASE							:     Dict						=				(
											    TFRegNetShortCut(snake_case       ,	stride=snake_case       ,	name='shortcut'	)
											    if should_apply_shortcut
											    else tf.keras.layers.Activation('linear'       ,	name='shortcut'	)
											)
											SCREAMING_SNAKE_CASE							:     List[str]						=				[
											    TFRegNetConvLayer(snake_case       ,	kernel_size=1       ,	activation=config.hidden_act       ,	name='layer.0'	),
											    TFRegNetConvLayer(
											        snake_case       ,	stride=snake_case       ,	groups=snake_case       ,	activation=config.hidden_act       ,	name='layer.1'	),
											    TFRegNetSELayer(snake_case       ,	reduced_channels=int(round(in_channels / 4	)	)       ,	name='layer.2'	),
											    TFRegNetConvLayer(snake_case       ,	kernel_size=1       ,	activation=snake_case       ,	name='layer.3'	),
											]
											SCREAMING_SNAKE_CASE							:     Union[str, Any]						=				ACTaFN[config.hidden_act]







						def       lowerCamelCase_				(  self    :				str       ,	snake_case    :				Optional[Any]	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     List[Any]						=				hidden_state
											for layer_module in self.layers:
																SCREAMING_SNAKE_CASE							:     Dict						=				layer_module(snake_case	)
											SCREAMING_SNAKE_CASE							:     int						=				self.shortcut(snake_case	)
											hidden_state += residual
											SCREAMING_SNAKE_CASE							:     Union[str, Any]						=				self.activation(snake_case	)
											return hidden_state


class 						lowercase    (							tf.keras.layers.Layer):
						'''simple docstring'''


						def __init__(  self    :				List[Any]       ,	snake_case    :				RegNetConfig       ,	snake_case    :				int       ,	snake_case    :				int       ,	snake_case    :				int = 2       ,	snake_case    :				int = 2       ,	**snake_case    :				Optional[int]	):



											'''simple docstring'''


											super().__init__(**snake_case	)

											SCREAMING_SNAKE_CASE							:     Optional[int]						=				TFRegNetXLayer if config.layer_type == 'x' else TFRegNetYLayer
											SCREAMING_SNAKE_CASE							:     List[str]						=				[
											    # downsampling is done in the first layer with stride of 2
											    layer(snake_case       ,	snake_case       ,	snake_case       ,	stride=snake_case       ,	name='layers.0'	),
											    *[layer(snake_case       ,	snake_case       ,	snake_case       ,	name=f'''layers.{i+1}'''	) for i in range(depth - 1	)],
											]







						def       lowerCamelCase_				(  self    :				Optional[Any]       ,	snake_case    :				Dict	):



											'''simple docstring'''


											for layer_module in self.layers:
																SCREAMING_SNAKE_CASE							:     Optional[int]						=				layer_module(snake_case	)
											return hidden_state


class 						lowercase    (							tf.keras.layers.Layer):
						'''simple docstring'''


						def __init__(  self    :				int       ,	snake_case    :				RegNetConfig       ,	**snake_case    :				Dict	):



											'''simple docstring'''


											super().__init__(**snake_case	)
											SCREAMING_SNAKE_CASE							:     Optional[int]						=				[]
											# based on `downsample_in_first_stage`, the first layer of the first stage may or may not downsample the input
											self.stages.append(
											    TFRegNetStage(
											        snake_case       ,	config.embedding_size       ,	config.hidden_sizes[0]       ,	stride=2 if config.downsample_in_first_stage else 1       ,	depth=config.depths[0]       ,	name='stages.0'       ,	)	)
											SCREAMING_SNAKE_CASE							:     str						=				zip(config.hidden_sizes       ,	config.hidden_sizes[1:]	)
											for i, ((in_channels, out_channels), depth) in enumerate(zip(snake_case       ,	config.depths[1:]	)	):
																self.stages.append(TFRegNetStage(snake_case       ,	snake_case       ,	snake_case       ,	depth=snake_case       ,	name=f'''stages.{i+1}'''	)	)







						def       lowerCamelCase_				(  self    :				Any       ,	snake_case    :				tf.Tensor       ,	snake_case    :				bool = False       ,	snake_case    :				bool = True	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     Any						=				() if output_hidden_states else None

											for stage_module in self.stages:
																if output_hidden_states:
																					SCREAMING_SNAKE_CASE							:     List[str]						=				hidden_states + (hidden_state,)

																SCREAMING_SNAKE_CASE							:     Union[str, Any]						=				stage_module(snake_case	)

											if output_hidden_states:
																SCREAMING_SNAKE_CASE							:     str						=				hidden_states + (hidden_state,)

											if not return_dict:
																return tuple(v for v in [hidden_state, hidden_states] if v is not None	)

											return TFBaseModelOutputWithNoAttention(last_hidden_state=snake_case       ,	hidden_states=snake_case	)


@keras_serializable
class 						lowercase    (							tf.keras.layers.Layer):
						'''simple docstring'''


						UpperCAmelCase			:		Tuple		=		RegNetConfig







						def __init__(  self    :				Optional[int]       ,	snake_case    :				Any       ,	**snake_case    :				Union[str, Any]	):



											'''simple docstring'''


											super().__init__(**snake_case	)
											SCREAMING_SNAKE_CASE							:     List[str]						=				config
											SCREAMING_SNAKE_CASE							:     int						=				TFRegNetEmbeddings(snake_case       ,	name='embedder'	)
											SCREAMING_SNAKE_CASE							:     Dict						=				TFRegNetEncoder(snake_case       ,	name='encoder'	)
											SCREAMING_SNAKE_CASE							:     Tuple						=				tf.keras.layers.GlobalAveragePoolingaD(keepdims=snake_case       ,	name='pooler'	)







						@unpack_inputs
						def       lowerCamelCase_				(  self    :				Optional[int]       ,	snake_case    :				tf.Tensor       ,	snake_case    :				Optional[bool] = None       ,	snake_case    :				Optional[bool] = None       ,	snake_case    :				bool = False       ,	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     Dict						=				(
											    output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
											)
											SCREAMING_SNAKE_CASE							:     Union[str, Any]						=				return_dict if return_dict is not None else self.config.use_return_dict

											SCREAMING_SNAKE_CASE							:     List[Any]						=				self.embedder(snake_case       ,	training=snake_case	)

											SCREAMING_SNAKE_CASE							:     List[str]						=				self.encoder(
											    snake_case       ,	output_hidden_states=snake_case       ,	return_dict=snake_case       ,	training=snake_case	)

											SCREAMING_SNAKE_CASE							:     Any						=				encoder_outputs[0]
											SCREAMING_SNAKE_CASE							:     List[Any]						=				self.pooler(snake_case	)

											# Change to NCHW output format have uniformity in the modules
											SCREAMING_SNAKE_CASE							:     Any						=				tf.transpose(snake_case       ,	perm=(0, 3, 1, 2)	)
											SCREAMING_SNAKE_CASE							:     str						=				tf.transpose(snake_case       ,	perm=(0, 3, 1, 2)	)

											# Change the other hidden state outputs to NCHW as well
											if output_hidden_states:
																SCREAMING_SNAKE_CASE							:     str						=				tuple([tf.transpose(snake_case       ,	perm=(0, 3, 1, 2)	) for h in encoder_outputs[1]]	)

											if not return_dict:
																return (last_hidden_state, pooled_output) + encoder_outputs[1:]

											return TFBaseModelOutputWithPoolingAndNoAttention(
											    last_hidden_state=snake_case       ,	pooler_output=snake_case       ,	hidden_states=hidden_states if output_hidden_states else encoder_outputs.hidden_states       ,	)


class 						lowercase    (							SCREAMING_SNAKE_CASE_):
						'''simple docstring'''


						UpperCAmelCase			:		List[Any]		=		RegNetConfig
						UpperCAmelCase			:		List[Any]		=		'regnet'
						UpperCAmelCase			:		Union[str, Any]		=		'pixel_values'







						@property
						def       lowerCamelCase_				(  self    :				Optional[Any]	):



											'''simple docstring'''


											return {"pixel_values": tf.TensorSpec(shape=(None, self.config.num_channels, 224, 224)       ,	dtype=tf.floataa	)}


_lowerCamelCase    :		Union[str, Any]		      =    R"""
    Parameters:
    This model is a Tensorflow
    [tf.keras.layers.Layer](https://www.tensorflow.org/api_docs/python/tf/keras/layers/Layer) sub-class. Use it as a
    regular Tensorflow Module and refer to the Tensorflow documentation for all matter related to general usage and
    behavior.
        config ([`RegNetConfig`]): Model configuration class with all the parameters of the model.
            Initializing with a config file does not load the weights associated with the model, only the
            configuration. Check out the [`~TFPreTrainedModel.from_pretrained`] method to load the model weights.
"""

_lowerCamelCase    :		Optional[int]		      =    R"""
    Args:
        pixel_values (`tf.Tensor` of shape `(batch_size, num_channels, height, width)`):
            Pixel values. Pixel values can be obtained using [`AutoImageProcessor`]. See
            [`ConveNextImageProcessor.__call__`] for details.
        output_hidden_states (`bool`, *optional*):
            Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
            more detail.
        return_dict (`bool`, *optional*):
            Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple.
"""


@add_start_docstrings(
    'The bare RegNet model outputting raw features without any specific head on top.'      ,    SCREAMING_SNAKE_CASE_      ,    )
class 						lowercase    (							SCREAMING_SNAKE_CASE_):
						'''simple docstring'''


						def __init__(  self    :				int       ,	snake_case    :				RegNetConfig       ,	*snake_case    :				Tuple       ,	**snake_case    :				Optional[Any]	):



											'''simple docstring'''


											super().__init__(snake_case       ,	*snake_case       ,	**snake_case	)
											SCREAMING_SNAKE_CASE							:     Optional[int]						=				TFRegNetMainLayer(snake_case       ,	name='regnet'	)







						@unpack_inputs
						@add_start_docstrings_to_model_forward(snake_case	)
						@add_code_sample_docstrings(
						    checkpoint=_CHECKPOINT_FOR_DOC       ,	output_type=snake_case       ,	config_class=_CONFIG_FOR_DOC       ,	modality='vision'       ,	expected_output=_EXPECTED_OUTPUT_SHAPE       ,	)
						def       lowerCamelCase_				(  self    :				List[Any]       ,	snake_case    :				tf.Tensor       ,	snake_case    :				Optional[bool] = None       ,	snake_case    :				Optional[bool] = None       ,	snake_case    :				Union[str, Any]=False       ,	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     Tuple						=				(
											    output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
											)
											SCREAMING_SNAKE_CASE							:     str						=				return_dict if return_dict is not None else self.config.use_return_dict

											SCREAMING_SNAKE_CASE							:     int						=				self.regnet(
											    pixel_values=snake_case       ,	output_hidden_states=snake_case       ,	return_dict=snake_case       ,	training=snake_case       ,	)
											if not return_dict:
																return (outputs[0],) + outputs[1:]

											return TFBaseModelOutputWithPoolingAndNoAttention(
											    last_hidden_state=outputs.last_hidden_state       ,	pooler_output=outputs.pooler_output       ,	hidden_states=outputs.hidden_states       ,	)


@add_start_docstrings(
    '\n    RegNet Model with an image classification head on top (a linear layer on top of the pooled features), e.g. for\n    ImageNet.\n    '      ,    SCREAMING_SNAKE_CASE_      ,    )
class 						lowercase    (							SCREAMING_SNAKE_CASE_      ,    SCREAMING_SNAKE_CASE_):
						'''simple docstring'''


						def __init__(  self    :				Tuple       ,	snake_case    :				RegNetConfig       ,	*snake_case    :				Tuple       ,	**snake_case    :				Dict	):



											'''simple docstring'''


											super().__init__(snake_case       ,	*snake_case       ,	**snake_case	)
											SCREAMING_SNAKE_CASE							:     Union[str, Any]						=				config.num_labels
											SCREAMING_SNAKE_CASE							:     Optional[int]						=				TFRegNetMainLayer(snake_case       ,	name='regnet'	)
											# classification head
											SCREAMING_SNAKE_CASE							:     str						=				[
											    tf.keras.layers.Flatten(),
											    tf.keras.layers.Dense(config.num_labels       ,	name='classifier.1'	) if config.num_labels > 0 else tf.identity,
											]







						@unpack_inputs
						@add_start_docstrings_to_model_forward(snake_case	)
						@add_code_sample_docstrings(
						    checkpoint=_IMAGE_CLASS_CHECKPOINT       ,	output_type=snake_case       ,	config_class=_CONFIG_FOR_DOC       ,	expected_output=_IMAGE_CLASS_EXPECTED_OUTPUT       ,	)
						def       lowerCamelCase_				(  self    :				Optional[int]       ,	snake_case    :				tf.Tensor = None       ,	snake_case    :				tf.Tensor = None       ,	snake_case    :				bool = None       ,	snake_case    :				bool = None       ,	snake_case    :				str=False       ,	):



											'''simple docstring'''


											SCREAMING_SNAKE_CASE							:     str						=				(
											    output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
											)
											SCREAMING_SNAKE_CASE							:     int						=				return_dict if return_dict is not None else self.config.use_return_dict

											SCREAMING_SNAKE_CASE							:     Tuple						=				self.regnet(
											    snake_case       ,	output_hidden_states=snake_case       ,	return_dict=snake_case       ,	training=snake_case	)

											SCREAMING_SNAKE_CASE							:     Dict						=				outputs.pooler_output if return_dict else outputs[1]

											SCREAMING_SNAKE_CASE							:     Optional[int]						=				self.classifier[0](snake_case	)
											SCREAMING_SNAKE_CASE							:     Tuple						=				self.classifier[1](snake_case	)

											SCREAMING_SNAKE_CASE							:     List[str]						=				None if labels is None else self.hf_compute_loss(labels=snake_case       ,	logits=snake_case	)

											if not return_dict:
																SCREAMING_SNAKE_CASE							:     Union[str, Any]						=				(logits,) + outputs[2:]
																return ((loss,) + output) if loss is not None else output

											return TFSequenceClassifierOutput(loss=snake_case       ,	logits=snake_case       ,	hidden_states=outputs.hidden_states	)




import requests

_lowerCamelCase    :		int		      =    """https://newsapi.org/v1/articles?source=bbc-news&sortBy=top&apiKey="""

def        __a			(   __lowerCAmelCase   )     ->     None:
					# fetching a list of articles in json format
					SCREAMING_SNAKE_CASE							:     List[str]						=				requests.get(_NEWS_API + bbc_news_api_key   ).json()
					# each article in the list is a dict
					for i, article in enumerate(bbc_news_page['articles']      ,	1   ):
										print(F'''{i}.) {article['title']}'''   )


if __name__ == "__main__":
			fetch_bbc_news(bbc_news_api_key="""<Your BBC News API key goes here>""")