code: def refactor_extract_method(self, start, end, name,
                                  make_global):
          
          refactor = ExtractMethod(self.project, self.resource, start, end)
          return self._get_changes(
              refactor, name, similar=True, global_=make_global
          )
docs: Extract region as a method.