code: def resource(self, resource_type):
          
          try:
              resource = getattr(self.resources, self.safe_rt(resource_type))(self)
          except AttributeError:
              self._resources(True)
              resource = getattr(self.resources, self.safe_rt(resource_type))(self)
          return resource
docs: Get instance of Resource Class with dynamic type.
  
          Args:
              resource_type: The resource type name (e.g Adversary, User Agent, etc).
  
          Returns:
              (object): Instance of Resource Object child class.