def METHOD_NAME(step):
    """
    Step to create a contextElement if doesnt exist, and add the attributes data defined before
    add a context element with the before attrs and the followin entity properties
    | entity_id | entity_type | is_pattern(optional) |
    :param step:
    :return:
    """
    check_world_attribute_is_not_none(['attributes_creation'])
    if not isinstance(world.context_elements, ContextElements):
        world.context_elements = ContextElements()
    for line in step.hashes:
        if "is_pattern" in line:
            world.context_elements.add_context_element(line['entity_id'], line['entity_type'],
                                                       world.attributes_creation,
                                                       line['is_pattern'])
        else:
            world.context_elements.add_context_element(line['entity_id'], line['entity_type'],
                                                       world.attributes_creation)