code: def _maybe_remove_implicit_api(self, template):
          
  
          # Remove Implicit API resource if no paths got added
          implicit_api_resource = template.get(self.implicit_api_logical_id)
  
          if implicit_api_resource and len(implicit_api_resource.properties["DefinitionBody"]["paths"]) == 0:
              # If there's no implicit api and the author defined a "ServerlessRestApi"
              # resource, restore it
              if self.existing_implicit_api_resource:
                  template.set(self.implicit_api_logical_id, self.existing_implicit_api_resource)
              else:
                  template.delete(self.implicit_api_logical_id)
docs: Implicit API resource are tentatively added to the template for uniform handling of both Implicit & Explicit
          APIs. They need to removed from the template, if there are *no* API events attached to this resource.
          This method removes the Implicit API if it does not contain any Swagger paths (added in response to API events).
  
          :param SamTemplate template: SAM Template containing the Implicit API resource