def _construct_schema(elements, nsmap):
    """Consruct fiona schema based on given elements

    :param list Element: list of elements
    :param dict nsmap: namespace map

    :return dict: schema
    """

    schema = {
        'properties': {},
        'geometry': None
    }

    schema_key = None
    gml_key = None

    # if nsmap is defined, use it
    if nsmap:
        for key in nsmap:
            if nsmap[key] == XS_NAMESPACE:
                schema_key = key
            if GML_NAMESPACES in nsmap[key]:
                gml_key = key
    # if no nsmap is defined, we have to guess
    else:
        gml_key = 'gml'
        schema_key = 'xsd'

    for element in elements:
        data_type = element.attrib['type'].replace(gml_key + ':', '')
        name = element.attrib['name']

        if data_type == 'PointPropertyType':
            schema['geometry'] = 'Point'
        elif data_type == 'PolygonPropertyType':
            schema['geometry'] = 'Polygon'
        elif data_type == 'LineStringPropertyType':
            schema['geometry'] = 'LineString'
        elif data_type == 'MultiPointPropertyType':
            schema['geometry'] = 'MultiPoint'
        elif data_type == 'MultiLineStringPropertyType':
            schema['geometry'] = 'MultiLineString'
        elif data_type == 'MultiPolygonPropertyType':
            schema['geometry'] = 'MultiPolygon'
        elif data_type == 'MultiGeometryPropertyType':
            schema['geometry'] = 'MultiGeometry'
        elif data_type == 'GeometryPropertyType':
            schema['geometry'] = 'GeometryCollection'
        elif data_type == 'SurfacePropertyType':
            schema['geometry'] = '3D Polygon'
        else:
            schema['properties'][name] = data_type.replace(schema_key+':', '')

    if schema['properties'] or schema['geometry']:
        return schema
    else:
        return None
dataset/ETHPy150Open geopython/OWSLib/owslib/feature/schema.py/_construct_schema/swapped operands of `in`