def setup_query(person_complete_name: str):
    """
    Return the SPARQL query for obtaining gender, birthdate and nationality (if available) of the given person from
    DBpedia
    :param person_complete_name: person whose metadata are of interest
    :return:
    """
    query_template = """
        SELECT *
        WHERE {{
            ?p foaf:name "{}"@en;
            foaf:gender ?gender;
            dbo:birthDate ?birthdate.
            optional {{ ?p dbp:nationality ?nationality_dbp }}
            optional {{ ?p dbo:nationality ?nationality_dbo }}
        }}
    """.format(person_complete_name)
    return query_template