code: def component_basis_str(basis, elements=None):
      '''Print a component basis set
  
      If elements is not None, only the specified elements will be printed
      (see :func:`bse.misc.expand_elements`)
      '''
  
      s = "Description: " + basis['description'] + '\n'
  
      eldata = basis['elements']
  
      # Filter to the given elements
      if elements is None:
          elements = list(eldata.keys())
      else:
          elements = expand_elements(elements, True)
  
      # Add the str for each element
      for z in elements:
          s += element_data_str(z, eldata[z]) + '\n'
  
      return f component_basis_str(basis, elements=None):
      '''Print a component basis set
  
      If elements is not None, only the specified elements will be printed
      (see :func:`bse.misc.expand_elements`)
      '''
  
      s = "Description: " + basis['description'] + '\n'
  
      eldata = basis['elements']
  
      # Filter to the given elements
      if elements is None:
          elements = list(eldata.keys())
      else:
          elements = expand_elements(elements, True)
  
      # Add the str for each element
      for z in elements:
          s += element_data_str(z, eldata[z]) + '\n'
  
      return s
docs: Print a component basis set
  
      If elements is not None, only the specified elements will be printed
      (see :func:`bse.misc.expand_elements`)