human
Write me a Python function to count empty spaces in a line.
assistant
Here is a Python function to count empty spaces in a line

import re

def count_empty_spaces(line):
    """
    Count the number of empty spaces in a line.
    """
    return len(line.split()) - len(line)

# Enter the line
line = "This is a line with spaces"

# Calling the function
print((count_empty_spaces(line)))

#Example Output
# -20

#Remember to inspect code for bugs.