'List networks. Similar to the ``docker networks ls`` command.
Args:
names (:py:class:`list`): List of names to filter by
ids (:py:class:`list`): List of ids to filter by
filters (dict): Filters to be processed on the network list.
Available filters:
- ``driver=[<driver-name>]`` Matches a network\'s driver.
- ``label=[<key>]`` or ``label=[<key>=<value>]``.
- ``type=["custom"|"builtin"]`` Filters networks by type.
Returns:
(dict): List of network objects.
Raises:
:py:class:`docker.errors.APIError`
If the server returns an error.'

@minimum_version('1.21')
def networks(self, names=None, ids=None, filters=None):

    if (filters is None):
        filters = {}
    if names:
        filters['name'] = names
    if ids:
        filters['id'] = ids
    params = {'filters': utils.convert_filters(filters)}
    url = self._url('/networks')
    res = self._get(url, params=params)
    return self._result(res, json=True)
