code: def rbm(opytimizer):
      # Gathers params
      lr = opytimizer[0][0]
      momentum = opytimizer[1][0]
      decay = opytimizer[2][0]
  
      # Creates an RBM
      model = RBM(
          n_visible=784,
          n_hidden=128,
          steps=1,
          learning_rate=lr,
          momentum=momentum,
          decay=decay,
          temperature=1,
          use_gpu=False,
      )
  
      # Training an RBM
      error, _ = model.fit(train, batch_size=128, epochs=5)
  
      return error
  
imports: import torchvision
  from learnergy.models.bernoulli import RBM
  from opytimizer import Opytimizer
  from opytimizer.core import Function
  from opytimizer.optimizers.swarm import PSO
  from opytimizer.spaces import SearchSpace
label_desc: Use image node_id 1 for calling a global function with example usage: rbm(opytimizer) and returns: error