def from_pairs(pairs):
    """Returns a dict from the given list of pairs.

    Args:
        pairs (list): List of key-value pairs.

    Returns:
        dict

    Example:

        >>> from_pairs([['a', 1], ['b', 2]]) == {'a': 1, 'b': 2}
        True

    .. versionadded:: 4.0.0
    """
    return dict(pairs)
