def METHOD_NAME(step):
    """
    Build the payload, taking into account the entities has to be defined in steps before
    || attributes(list, separated by comma)(optional) ||
    :param step:
    :return:
    """
    check_world_attribute_is_not_none(['entities'])
    if len(step.hashes) > 0:
        if 'attributes' in step.hashes[0]:
            rows = len(step.hashes)
            if rows != 1:
                raise ValueError('The table of the step has to have only 1 row but it has {rows}'.format(rows=rows))
            world.payloads[world.payloads_count] = PayloadUtils.build_standard_query_context_payload(
                world.entities, step.hashes[0]['attributes'].split(','))
        else:
            raise ValueError('The column expected in the table is "attributes"')
    else:
        world.payloads[world.payloads_count] = PayloadUtils.build_standard_query_context_payload(
            world.entities)