ef METHOD_NAME(self):
  """Creates a beads object.
  Returns:
     A beads object of the appropriate type and with the appropriate
     properties given the attributes of the InputBeads object.
  """
  super(InputBeads,self).METHOD_NAME()
  beads = Beads(self.natoms.METHOD_NAME(),self.nbeads.METHOD_NAME())
  # tries to fill up with as much data as available and valid
  q = self.q.METHOD_NAME()
  if (q.shape == (beads.nbeads,3*beads.natoms)):
     beads.q = q
  elif (beads.nbeads == 1 and q.shape == (3*beads.natoms,)):
     beads.q = q
  elif len(q) != 0:
     raise ValueError("Array shape mismatches for q in <beads> input.")
  p = self.p.METHOD_NAME()
  if (p.shape == (beads.nbeads,3*beads.natoms)):
     beads.p = p
  elif (beads.nbeads == 1 and p.shape == (3*beads.natoms,)):
     beads.p = p
  elif len(p) != 0:
     raise ValueError("Array shape mismatches for p in <beads> input.")
  m = self.m.METHOD_NAME()
  if (m.shape == (beads.natoms,)):
     beads.m = m
  elif len(m) != 0:
     raise ValueError("Array shape mismatches for m in <beads> input.")
  n = self.names.METHOD_NAME()
  if (n.shape == (beads.natoms,)):
     beads.names = n
  elif len(n) != 0:
     raise ValueError("Array shape mismatches for names in <beads> input.")
  return beads