code: def _init_group(self, group, params, grads, prevs, step_sizes):
      has_complex = False
      for p in group["params"]:
          if p.grad is None:
              continue
          has_complex |= torch.is_complex(p)
          params.append(p)
          grad = p.grad
          if grad.is_sparse:
              raise RuntimeError(
                  "Rprop does not support sparse gradients"
              )
  
          grads.append(grad)
          state = self.state[p]
  
          # State initialization
          if len(state) == 0:
              state["step"] = 0
              state["prev"] = torch.zeros_like(
                  p, memory_format=torch.preserve_format
              )
              if p.dtype.is_complex:
                  # Complex Number should be as if they are two independent real numbers.
                  # Hence the step_size shouldn't be zero for imaginary part.
                  state["step_size"] = (
                      grad.new()
                      .resize_as_(grad)
                      .fill_(complex(group["lr"], group["lr"]))
                  )
              else:
                  state["step_size"] = (
                      grad.new().resize_as_(grad).fill_(group["lr"])
                  )
  
          prevs.append(state["prev"])
          step_sizes.append(state["step_size"])
  
          state["step"] += 1
      return has_complex
  
file_path: pytorch/torch/optim/rprop.py
imports: import torch
  from torch import Tensor
  from .optimizer import Optimizer, _use_grad_for_differentiable, _default_to_fused_or_foreach, _differentiable_doc, _foreach_doc, _maximize_doc, _view_as_real
  from typing import List, Optional
label_desc: Use image node_id 3 for calling the Rprop obj's underlying member method code with example usage: obj._init_group(group, params, grads, prevs, step_sizes) and returns: has_complex