So Google appears to be expecting you to either not use additional python modules on Colab (which means no FEniCS on Colab), or else to install them manually using pip.
For a package the size of dolfin, reinstalling via pip is not a lot of fun, but it can be done. This recipe (from Chris Richardson) works: [edit: build dolfin first, mpi4py second]
# Add FEniCS PPA to Ubuntu and install (Python3.6)
!echo deb http://ppa.launchpad.net/fenics-packages/fenics/ubuntu bionic main >> /etc/apt/sources.list
!apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2C5275D7EF63D9DE2D28D3702940F5212B746472
!apt-get -qq update
!apt-get -y install fenics > /dev/null
# Reinstall dolfin for Python3.7
!rm -r /usr/lib/petsc/lib/python3/dist-packages/dolfin
!git clone https://bitbucket.org/fenics-project/dolfin
!cd dolfin/python && python3 setup.py install
# Reinstall mpi4py for Python3.7
!rm -r /usr/lib/python3/dist-packages/mpi4py*
!pip3 install mpi4py --upgrade
[Edit] Intuitively you would expect that you should rebuild mpi4py first, but if you try that then the dolfin build loses track of petsc4py and fails. Build dolfin first as shown here, and it will work.
Note that dolfin itself (the C++ library) does not need to be rebuilt, only the python module needs rebuilding. So the procedure is not too painful (around 10 minutes).
Rebuilding petsc4py against python3.7, as done for mpi4py, fails. It means petsc4py will not be available for you. There is a reason why the Linux distributions exist, rather than installing everything ad hoc via pip. The distributions ensure self-consistency between the various package versions across the entire installation.
Colab is broken.