def generate_relating_lines(input_field, output_field, function_name, field_prefix=""):
    """
    Generates lua lines that checks other fields related to input_field for feature engineering

    :param input_field: original censys field
    :param output_field: flattened version of censys field
    :param function_name: the lua function that will encode the field
    :param field_prefix: an optional string to be concatenated at the end of original field
    :return:
    """
    lines = [
        f'event["{output_field}_{field_prefix}"] = {function_name}(event, "{input_field}")'
    ]
    return lines