Fix make fix-copies with type annotations
# What does this PR do?

As pointed out by #13583, there is a bug in the current check_copies utils when a function has a very long signature and a type annotation. This was due to a regex only checking for `):` instead of `):` or `) -> type:`. This PR fixes that and pushes some changes due to divergences that went undetected.

Fixes #13583 
@patrickvonplaten Can you double-check the changes in HuBERT are good?<|||||>@sgugger I pulled this PR and found there is 1 edge case remained:

https://github.com/huggingface/transformers/blob/95f933ea855bce0c18a665f7a6a3b8ae9ab11739/src/transformers/models/bert/modeling_tf_bert.py#L902

Change the above line to

```
def serving_output(self, output: TFBaseModelOutputWithPooling):
```
or
```
def serving_output(self, inputs, output: TFBaseModelOutputWithPooling) -> TFBaseModelOutputWithPooling:
```
or
```
def serving_output(self, output2: TFBaseModelOutputWithPooling) -> TFBaseModelOutputWithPooling:
```

Currently (with the work in this PR), these changes won't be copied to 
https://github.com/huggingface/transformers/blob/95f933ea855bce0c18a665f7a6a3b8ae9ab11739/src/transformers/models/roberta/modeling_tf_roberta.py#L762
<|||||>Ok for HuBERT<|||||>@ydshieh This is not a edge case but the way the check copies utility has been implemented. It does not check for the class name, function name, just the code inside. This is why the introduction line is ignored in the check.<|||||>@sgugger , Thanks, I understand now. However, I personally feel this is a bit strange. In my work on encoder-decoder, I need to add cross-attention and cache mechanism to some models, and these involve changing some return value types.
Like `TFBaseModelOutput` to `TFBaseModelOutputWithPastAndCrossAttentions`.

And the way `check copies` is implemented won't copy this kind of changes (single-line function name & signature) as shown in the provided example.

Moreover, if the function name & signature have multiple lines, the added or removed parameters will be copied (suppose they are not in the same line as the function name). This is somehow inconsistent with the single-line case above.

I will let Hugging Face to decide if it is necessary to address this :)