def filter_type(data, titletype: str):
    """
    Filters the data so that it only returns rows with the
    defined value 'titletype' in the field titleType.
    Parameters:
        data = IMDb dataframe that contains the column 'titleType'.
        titletype = String value used to filter the data.
    Returns: A dataframe with rows that have the value 'titletype'
    in the field titleType.
    """
    return data[data['titleType'].str.contains(titletype)]