code: def _enforce_space(self, item):
          
          if isinstance(self._lines[-1],
                        (self._Space, self._LineBreak, self._Indent)):
              return
  
          if not self._prev_item:
              return
  
          item_text = unicode(item)
          prev_text = unicode(self._prev_item)
  
          # Prefer a space around a '.' in an import statement, and between the
          # 'import' and '('.
          if (
              (item_text == '.' and prev_text == 'from') or
              (item_text == 'import' and prev_text == '.') or
              (item_text == '(' and prev_text == 'import')
          ):
              self._lines.append(self._Space())
docs: Enforce a space in certain situations.
  
          There are cases where we will want a space where normally we
          wouldn't put one. This just enforces the addition of a space.