code: def get_idx_by_name(self, name):
          # type: (str) -> Optional[int]
          
          name = name.lower()
          for key, val in six.iteritems(type(self)._static_entries):
              if val.name() == name:
                  return key
          for idx, val in enumerate(self._dynamic_table):
              if val.name() == name:
                  return type(self)._static_entries_last_idx + idx + 1
          return None
docs: get_idx_by_name returns the index of a matching registered header
  
          This implementation will prefer returning a static entry index whenever
          possible. If multiple matching header name are found in the static
          table, there is insurance that the first entry (lowest index number)
          will be returned.
          If no matching header is found, this method returns None.