code: def hacking_docstring_multiline_end(physical_line, previous_logical, tokens):
      r
      docstring = is_docstring(tokens, previous_logical)
      if docstring:
          if '\n' not in docstring:
              # not a multi line
              return
          else:
              last_line = docstring.split('\n')[-1]
          pos = max(last_line.rfind(i) for i in END_DOCSTRING_TRIPLE)
          if len(last_line[:pos].strip()) > 0:
              # Something before the end docstring triple
              return (pos,
                      "H403: multi line docstrings should end on a new line")
docs: r"""Check multi line docstring end.
  
      OpenStack HACKING guide recommendation for docstring:
      Docstring should end on a new line
  
      Okay: '''foobar\nfoo\nbar\n'''
      Okay: def foo():\n    '''foobar\n\nfoo\nbar\n'''
      Okay: class Foo(object):\n    '''foobar\n\nfoo\nbar\n'''
      Okay: def foo():\n    a = '''not\na\ndocstring'''
      Okay: def foo():\n    a = '''not\na\ndocstring'''  # blah
      Okay: def foo():\n    pass\n'''foobar\nfoo\nbar\n   d'''
      H403: def foo():\n    '''foobar\nfoo\nbar\ndocstring'''
      H403: def foo():\n    '''foobar\nfoo\nbar\npretend raw: r'''
      H403: class Foo(object):\n    '''foobar\nfoo\nbar\ndocstring'''\n\n