Find the globals of `self` by importing `self.module`

def globals(self):
        """Find the globals of `self` by importing `self.module`"""
        try:
            return vars(__import__(self.module, fromlist=self.module.split('.')))
        except ImportError:
            if self.warn_import:
                warnings.warn(ImportWarning(
                    'Cannot import module {} for SerializableFunction. Restricting to builtins.'.format(self.module)
                ))
            return {'__builtins__': __builtins__}