'Constructs Signature from the given list of Parameter
objects and \'return_annotation\'.  All arguments are optional.'

def __init__(self, parameters=None, return_annotation=_empty, __validate_parameters__=True):

    if (parameters is None):
        params = OrderedDict()
    elif __validate_parameters__:
        params = OrderedDict()
        top_kind = _POSITIONAL_ONLY
        for (idx, param) in enumerate(parameters):
            kind = param.kind
            if (kind < top_kind):
                msg = 'wrong    parameter    order:    {0}    before    {1}'
                msg = msg.format(top_kind, param.kind)
                raise ValueError(msg)
            else:
                top_kind = kind
            name = param.name
            if (name is None):
                name = str(idx)
                param = param.replace(name=name)
            if (name in params):
                msg = 'duplicate    parameter    name:    {0!r}'.format(name)
                raise ValueError(msg)
            params[name] = param
    else:
        params = OrderedDict(((param.name, param) for param in parameters))
    self._parameters = params
    self._return_annotation = return_annotation
