docs: def get_tuning(instrument, description, nr_of_strings=None, nr_of_courses=None):
      """Get the first tuning that satisfies the constraints.
  
      The instrument and description arguments are treated like
      case-insensitive prefixes. So search for 'bass' is the same is
      'Bass Guitar'.
  
      Example:
      >>> tunings.get_tuning('guitar', 'standard')
      <tunings.StringTuning instance at 0x139ac20>
      """
      searchi = str.upper(instrument)
      searchd = str.upper(description)
      keys = _known.keys()
      for x in keys:
          if (searchi not in keys and x.find(searchi) == 0 or searchi in keys and
                  x == searchi):
              for (desc, tun) in _known[x][1].iteritems():
                  if desc.find(searchd) == 0:
                      if nr_of_strings is None and nr_of_courses is None:
                          return tun
                      elif nr_of_strings is not None and nr_of_courses is None:
                          if tun.count_strings() == nr_of_strings:
                              return tun
                      elif nr_of_strings is None and nr_of_courses is not None:
                          if tun.count_courses() == nr_of_courses:
                              return tun
                      else:
                          if tun.count_courses() == nr_of_courses\
                               and tun.count_strings() == nr_of_strings:
                              return tun