def from_dict(data, require=None):
    'Validates a dictionary containing Google service account data.\n\n    Creates and returns a :class:`google.auth.crypt.Signer` instance from the\n    private key specified in the data.\n\n    Args:\n        data (Mapping[str, str]): The service account data\n        require (Sequence[str]): List of keys required to be present in the\n            info.\n\n    Returns:\n        google.auth.crypt.Signer: A signer created from the private key in the\n            service account file.\n\n    Raises:\n        ValueError: if the data was in the wrong format, or if one of the\n            required keys is missing.\n    '
    keys_needed = set((require if (require is not None) else []))
    missing = keys_needed.difference(six.iterkeys(data))
    if missing:
        raise ValueError('Service account info was not in the expected format, missing fields {}.'.format(', '.join(missing)))
    signer = crypt.RSASigner.from_service_account_info(data)
    return signer
Validates a dictionary containing Google service account data.

Creates and returns a :class:`google.auth.crypt.Signer` instance from the
private key specified in the data.

Args:
    data (Mapping[str, str]): The service account data
    require (Sequence[str]): List of keys required to be present in the
        info.

Returns:
    google.auth.crypt.Signer: A signer created from the private key in the
        service account file.

Raises:
    ValueError: if the data was in the wrong format, or if one of the
        required keys is missing.
def from_dict(data, require=None):
    'Validates a dictionary containing Google service account data.\n\n    Creates and returns a :class:`google.auth.crypt.Signer` instance from the\n    private key specified in the data.\n\n    Args:\n        data (Mapping[str, str]): The service account data\n        require (Sequence[str]): List of keys required to be present in the\n            info.\n\n    Returns:\n        google.auth.crypt.Signer: A signer created from the private key in the\n            service account file.\n\n    Raises:\n        ValueError: if the data was in the wrong format, or if one of the\n            required keys is missing.\n    '
    keys_needed = set((require if (require is not None) else []))
    missing = keys_needed.difference(six.iterkeys(data))
    if missing:
        raise ValueError('Service account info was not in the expected format, missing fields {}.'.format(', '.join(missing)))
    signer = crypt.RSASigner.from_service_account_info(data)
    return signer