code: def has_field(self, dotted_name):
          
          parts = dotted_name.split('.')
          cur_layer = self
          for part in parts:
              if part in cur_layer.field_names:
                  cur_layer = cur_layer.get_field(part)
              else:
                  return False
          return True
docs: Checks whether the layer has the given field name.
          Can get a dotted name, i.e. layer.sublayer.subsublayer.field