Add type annotations for segformer pytorch
This PR adds type annotation for segformer pytorch as mentioned in #16059.
@Rocketknight1 
_The documentation is not available anymore as the PR was closed or merged._<|||||>I believe there are some minor mistakes in the types. `Optional[...]` is a shorthand notation for `Union[..., None]`, see [python doc](https://docs.python.org/3/library/typing.html#typing.Optional). Thus it must be used when `parameter : ... = None`. 

This PR makes `Optional` the following parameters in this [`forward method`](https://github.com/p-mishra1/transformers/blob/6ed256d4b04e99f24f62268c1f81efc47a5870f4/src/transformers/models/segformer/modeling_segformer.py#L396)

```
output_attentions: Optional[bool] = False,
output_hidden_states: Optional[bool] = False,
return_dict: Optional[bool] = True,
 ```
 
 While to be correct with the `Optional` definition given in python. 
 
 ```
output_attentions: bool = False,
output_hidden_states: bool = False,
return_dict: bool = True,
 ```
 
Since the code in the `forward` method doesn't check `output_attentions is not None`, to my understanding they should not be `Optional`.

cc @Rocketknight1