def extract_position_relations(qdmr_step):
    """Extract a relation regarding entity positions
     in a QDMR step. Relevant for VQA data

 Parameters
 ----------
 qdmr_step : str
     string of the QDMR step containg relative position knowledge.
     Either a FILTER of BOOLEAN step.

 Returns
 -------
 str
     string of the positional relation.
 """
    if ' left ' in qdmr_step:
        return 'POS_LEFT_OF'
    elif ' right ' in qdmr_step:
        return 'POS_RIGHT_OF'
    elif (' between ' in qdmr_step) or (' middle of ' in qdmr_step):
        return 'POS_BETWEEN'
    elif (' behind ' in qdmr_step) or (' rear of ' in qdmr_step):
        return 'POS_BEHIND_OF'
    elif (' in ' in qdmr_step and ' front ' in qdmr_step) or \
            (' infront ' in qdmr_step):
        return 'POS_IN_FRONT_OF'
    elif ' touch' in qdmr_step:
        return 'POS_TOUCHING'
    elif ' reflect' in qdmr_step:
        return 'POS_REFLECTING'
    elif (' cover' in qdmr_step) or (' obscur' in qdmr_step) or \
            (' blocking' in qdmr_step) or (' blocked' in qdmr_step) or \
            (' hidden' in qdmr_step) or (' obstruct' in qdmr_step):
        return 'POS_COVERS'
    elif (' near' in qdmr_step) or (' close ' in qdmr_step) or \
            (' closer ' in qdmr_step) or (' closest ' in qdmr_step) or \
            (' next to ' in qdmr_step) or (' adjacent ' in qdmr_step):
        return 'POS_NEAR'
    else:
        return None
    return None