code: def requiv_contact_min(b, component, solve_for=None, **kwargs):
      
      hier = b.get_hierarchy()
      if not len(hier.get_value()):
          # TODO: change to custom error type to catch in bundle.add_component
          # TODO: check whether the problem is 0 hierarchies or more than 1
          raise NotImplementedError("constraint for requiv_contact_min requires hierarchy")
  
  
      component_ps = _get_system_ps(b, component)
  
      parentorbit = hier.get_parent_of(component)
      parentorbit_ps = _get_system_ps(b, parentorbit)
  
      requiv_min = component_ps.get_parameter(qualifier='requiv_min')
      q = parentorbit_ps.get_parameter(qualifier='q')
      sma = parentorbit_ps.get_parameter(qualifier='sma')
  
      if solve_for in [None, requiv_min]:
          lhs = requiv_min
  
          rhs = roche_requiv_contact_L1(q, sma, hier.get_primary_or_secondary(component, return_ind=True))
      else:
          raise NotImplementedError("requiv_contact_min can only be solved for requiv_min")
  
      return lhs, rhs, {'component': component}
docs: Create a constraint to determine the critical (at L1) value of
      requiv at which a constact will underflow.  This will only be used
      for contacts for requiv_min
  
      :parameter b: the :class:`phoebe.frontend.bundle.Bundle`
      :parameter str component: the label of the star in which this
          constraint should be built
      :parameter str solve_for:  if 'requiv_max' should not be the derived/constrained
          parameter, provide which other parameter should be derived
      :returns: lhs (Parameter), rhs (ConstraintParameter), args (list of arguments
          that were passed to this function)