For this Question: You are given a chunk of data in the form of string. Your task is to match a given pattern from the data and return the number of times the pattern is matched in the data.
<b>Function Description</b>
Complete the function <b>count_pattern()</b> in the editor below. The function takes 2 parameters in the form of String.
- <b>data</b>
- <b>pattern</b>
Return :
- int : It should return the count of pattern matches in the data
<b>Note :</b> If the input instance is empty string `""`, then it should return "Empty".The first string of the input is data and the second string is pattern.Return the count of pattern matches in the data.Sample Input 
abccbea
abc
Sample Output
1
Explanation
One time pattern matches in the data. So it returns 1, I have written this Solution Code: def count_pattern(data, pattern):
    check = True
    count = 0

    if(data == "" or pattern == ""):
        count = "Empty"
    else:
        while(check):
            check = False
            if(data.__contains__(pattern)):
                check = True
                count += 1
                data = data.replace(pattern, '', 1)
    return count

, In this Programming Language: Python, Now tell me if this Code is compilable or not?