import re


def is_government(name):
    """Returns a boolean that keeps track of whether or not a shapefile record
    is associated with a local, county, or state government.

    Args:
        name: String that stores a shapefile record name

    Returns:
        is_government_flag: Boolean that keeps track of whether or not a
                            shapefile record is associated with a local
                            county, or state government."""

    is_government_flag = False

    government_regex = ['^city of dayton.*$',
                        '^board of county commissioners$',
                        '^dayton mont co public$',
                        '^dayton, city of$',
                        '^miami conservancy district$',
                        '^state of ohio.*$']

    for regex in government_regex:
        is_government_flag =\
            is_government_flag | (re.match(regex, name) is not None)

    return is_government_flag