def validate_data(in_data, expected_keys, expected_types):
    """ Validates the data

    The validate_data function takes in the input data and checks to make
    sure there are no missing values or incorrect data types

    Args:
        in_data (JSON): input data as a JSON/dictionary file
        expected_keys (list): list of expected data keys
        expected_types (list): list of expected data types

    Returns:
        (boolean): data is valid or not
        (int): status code

    """
    for key in expected_keys:
        if key not in in_data.keys():
            return "{} key not found in input".format(key), 400
    for i, data in enumerate(in_data.values()):
        if type(data) is not expected_types[i]:
            return "Incorrect input type for {}".format(data), 400
    return True, 200