def extract_specifications(specifications, properties):
    # type: (Any[str, List[str]], dict) -> List[str]
    """
    Converts "python:/name" specifications to "name". Keeps the other
    specifications as is.

    :param specifications: The specifications found in a remote registration
    :param properties: Service properties
    :return: The filtered specifications (as a list)
    """
    all_specs = set(pelix.utilities.to_iterable(specifications))
    try:
        synonyms = pelix.utilities.to_iterable(
            properties[pelix.remote.PROP_SYNONYMS], False
        )
        all_specs.update(synonyms)
    except KeyError:
        # No synonyms property
        pass

    filtered_specs = set()
    for original in all_specs:
        try:
            # Extract information
            lang, spec = _extract_specification_parts(original)
            if lang == PYTHON_LANGUAGE:
                # Language match: keep the name only
                filtered_specs.add(spec)
            else:
                # Keep the name as is
                filtered_specs.add(original)
        except ValueError:
            # Ignore invalid specifications
            pass

    return list(filtered_specs)
Converts "python:/name" specifications to "name". Keeps the other
    specifications as is.

    :param specifications: The specifications found in a remote registration
    :param properties: Service properties
    :return: The filtered specifications (as a list)