@classmethod
def polygon(cls, dcode, diameter, num_vertices, rotation, hole_diameter=
    None, hole_width=None, hole_height=None):
    """Create a polygon aperture definition statement"""
    if hole_diameter is not None and hole_diameter > 0:
        return cls('AD', dcode, 'P', ([diameter, num_vertices, rotation,
            hole_diameter],))
    elif hole_width is not None and hole_width > 0 and hole_height is not None and hole_height > 0:
        return cls('AD', dcode, 'P', ([diameter, num_vertices, rotation,
            hole_width, hole_height],))
    return cls('AD', dcode, 'P', ([diameter, num_vertices, rotation],))
