ENH: Import from TubeTK Gerrit.

Base functionality and a test.