Fix Python – What’s the correct way to sort Python `import x` and `from x import y` statements?

The python style guide suggests to group imports like this:

Imports should be grouped in the following order:

standard library imports
related third party imports
local application/library specific imports

However, it does not mention anything how the two different ways of imports should be laid out:
from foo import bar
import foo

There are m….