def get_pub_date(self, undefined="<STR_LIT>"):
dates = self["<STR_LIT>"] + self["<STR_LIT>"]<EOL>def clean_date(date):<EOL><INDENT>"""<STR_LIT>"""<EOL>out = "<STR_LIT>"<EOL>was_digit = False<EOL>for c in date:<EOL><INDENT>if c.isdigit() or (c == "<STR_LIT:->" and was_digit) or c == "<STR_LIT:U+0020>":<EOL><INDENT>out += c<EOL><DEDENT>was_digit = c.isdigit()<EOL><DEDENT>return out<EOL><DEDENT>dates = set([<EOL>clean_date(date)<EOL>for date in self["<STR_LIT>"] + self["<STR_LIT>"]<EOL>])<EOL>return _undefined_pattern(<EOL>"<STR_LIT:U+002CU+0020>".join(dates),<EOL>lambda x: x.strip() == "<STR_LIT>",<EOL>undefined<EOL>)<EOL>
Args:
    undefined (optional): Argument, which will be returned if the
              `pub_date` record is not found.

Returns:
    str: Date of publication (month and year usually) or `undefined` \
         if `pub_date` is not found.